CN102364434B - Method for integrating Wine and Android mouse input - Google Patents

Method for integrating Wine and Android mouse input Download PDF

Info

Publication number
CN102364434B
CN102364434B CN201110173748.8A CN201110173748A CN102364434B CN 102364434 B CN102364434 B CN 102364434B CN 201110173748 A CN201110173748 A CN 201110173748A CN 102364434 B CN102364434 B CN 102364434B
Authority
CN
China
Prior art keywords
mouse
tinyx
dll
event
android
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201110173748.8A
Other languages
Chinese (zh)
Other versions
CN102364434A (en
Inventor
毛德操
王承志
徐鼎鼎
陈天洲
邵景程
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
INSIGMA TECHNOLOGY Co Ltd
Original Assignee
INSIGMA TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by INSIGMA TECHNOLOGY Co Ltd filed Critical INSIGMA TECHNOLOGY Co Ltd
Priority to CN201110173748.8A priority Critical patent/CN102364434B/en
Publication of CN102364434A publication Critical patent/CN102364434A/en
Application granted granted Critical
Publication of CN102364434B publication Critical patent/CN102364434B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method for integrating Wine and Android mouse input, which is mainly used for processing a mouse input event happened when an ordinary Linux application program is executed in an Android system, and comprises the following steps that: a proxy process WineProxy is established to receive the mouse input event; a way for acquiring the mouse input from a kernel is disconnected in a TinyX; a communication connection between the TinyX and the WineProxy is established; when a mouse input event happens, the WineProxy transmits an event notice to the TinyX through the communication connection; and after receiving the event notice, the event notice is encapsulated into a message in a TinyX format by the TinyX to be transmitted to the application program to process.

Description

A kind of method of integrating Wine and the input of Android mouse
Technical field
The present invention relates to intelligent mobile terminal field, in particular, relate to a kind of method of Wine of integration and the input of Android mouse.
Background technology
The Intelligent mobile terminal that the mobile phone of take is representative is important development direction of computer technology, so market competition is very fierce.Since Google and open mobile phone alliance's release Android operating system and the mobile phone based on this system, the mobile phone market share based on Android system is on the increase, and therefore increasing user's experience problem is concerned.
So-called Android operating system, be actually a kind of reorganization of (SuSE) Linux OS and expand, its kernel is the kernel of the Linux through revising, but but specially for the application characteristic of the mobile terminal device of for example mobile phone, done significantly improve and strengthen at user's space, these are changed mostly and programming mode and graphical interfaces, and graphic user interface (GUI) is relevant.
In the (SuSE) Linux OS with graphical interfaces, the function of relevant graphical interfaces is provided by X windows system, and mouse input is also a part for graphical interfaces function.Move not directly reading mouse inputs of process of application software, but from X service processes (Xserver), obtaining input by interprocess communication.The input of man-machine interaction first in native system unique Xserver read, by Xserver, unify in addition early stage and process, then according to the current location of onscreen cursor and current form in " focusing " state, provide and deliver to suitable process/thread.Said in earlier stage process herein can letter can be numerous, simple processing itself implemented by X form, complicated processing will be processed by plug-in program module, and mouse input processing just belongs to such plug-in program module.So, for the mouse input processing of Linux application, be actually the mouse input processing into X form.
X form belongs to another open source software project, as far back as the Unix epoch, exists.Because linux system be unable to do without graphical interfaces mostly, X form has in fact become a part for (SuSE) Linux OS.For adapting to the needs of mobile terminal and other embedded system, technician by the in addition cutting of X form, reduce the staff, simplify, become the version of a miniaturization, be called TinyX.Therefore TinyX is the special X windows system of using with built-in Linux pairing, so also by the Linux application on mobile phone and the mouse input processing program of exploitation is called TinyX mouse discrepancy handling procedure.
, in Android system, but throw TinyX away, comprise that all graphical interfaces functions of mouse input processing are all provided by Android oneself.Equally, Android also has and oneself is similar to such the focusing on and the mechanism of the input message of providing and delivering of TinyX.If make to move common Linux application on Android mobile phone, the processing of mouse input just becomes a problem.This be because, Linux application must with TinyX matching running, and used TinyX, and just can only use the TinyX mouse input processing program supporting with it, all Android application but can only continue to use the mouse input processing program being provided by Android.Like this, will form the coexistent situation of TinyX and Android, now from the physical state information of touch-screen and other input equipment, no longer by unique entity, be unified to process and dispensing, can cause the problem of following two aspects.First, may have the situation generation of fighting for input message; Secondly, even if do not fight for the situation of input message, user also may apply and adopt a kind of mouse input processing program when mutual with Android, and applying and adopting another kind of mouse input processing program when mutual with Linux, due to both difference in function and performance, can experience and make troubles to user.
Wine is transplanted to after Linux platform, and the WinCE/WM application software based on Windows operating system can, in the operation of Linux platform, therefore exist TinyX and Android to fight for the problem of Wine application program mouse input equally.
Summary of the invention
In view of this, the object of the present invention is to provide a kind of method of Wine of integration and the input of Android mouse, make Android become the sole entity of the unified mouse input message that receives, processes, provides and delivers, to the Linux application moving, provide mouse input message on Android mobile phone, allow user need to be on same mobile phone because will be mutual from different application and not use different mouse input processing programs.
According to one embodiment of the invention a kind of, integrate the method for Wine and the input of Android mouse, the mouse incoming event occurring when carrying out common Linux application program in Android system is processed, and its processing procedure comprises the following steps:
Step 1, creates an agent process WineProxy and receives described mouse incoming event;
Step 2 is cut off the approach that obtains mouse input from kernel in TinyX;
Step 3 establishes a communications link between TinyX and WineProxy;
, there is mouse incoming event in step 4, WineProxy sends event notice by described communication connection to TinyX;
Step 5, TinyX will receive after described event notice, will be packaged into be sent to program process after the message of TinyX form and to process.
The method of the integration Wine realizing according to above technical scheme and the input of Android mouse, mouse handling procedure and dispensing mechanism that mouse input will be unified to flow through and be provided by Android, first by agent process, received, be transmitted to again TinyX, finally arrive running Linux application process, in whole process, only have processing and the dispensing mechanism of a set of mouse input message, thereby realize Wine and Android mouse input integration.
Accompanying drawing explanation
Figure 1 shows that and integrate Wine and Android mouse input system basic structure schematic diagram;
Figure 2 shows that the software configuration schematic diagram of integrating Wine and the input of Android mouse;
Figure 3 shows that and integrate Wine and Android mouse input processing process flow diagram.
Embodiment
Below in conjunction with accompanying drawing, the preferred embodiments of the present invention are described in detail, but the present invention is not restricted to these embodiment.The present invention contain any in marrow of the present invention and scope, make substitute, modification, equivalent method and scheme.In order to make the public that the present invention is had thoroughly and be understood, in the following preferred embodiment of the present invention, describe concrete details in detail, and do not have for a person skilled in the art the description of these details also can understand the present invention completely.
With reference to figure 1, be depicted as and integrate Wine and Android mouse input system basic structure schematic diagram, in figure, horizontal dotted line represents the boundary of user's space and system space, and dotted line is user's space above, and dotted line is system space below, and linux kernel 140.WinCE/WM application process 120 comprises EXE reflection 121 and the Wine dynamic link library 122 of WinCE/WM.Except operation WinCE/WM application process 120, in system, at least also have two processes, one is Wineserver110, i.e. Wine server processes; Another is Xserver130, i.e. TinyX server processes.Why WinCE/WM application process 120 can be moved on linux kernel, is because there is the support of Wineserver110 and Wine dynamic link library 122.And why WinCE/WM application process 120 can obtain Genius mouse input, why can be on screen display graphics, be because there is the existence of Xserver130.In conventional linux system, from the input of Genius mouse, all by Xserver, intercepted and captured, then be distributed to the current process being focused on by Xserver.
With reference to figure 2, be depicted as the software configuration schematic diagram of integrating Wine and the input of Android mouse.Integrate the inputs of Wine and Android mouse the modification of original Android system is related generally to following three parts.Wherein for managing the subsystem of application program, revising the respective sources code of comctl32.dll and winex11.drv.dll, increase following function, in comctl32.dll, add the function that can judge whether to need to eject auxiliary input frame, make its this click of position judgment that can click according to mouse whether need on screen, eject auxiliary input frame as response, in winex11.drv.dll, add an api function, make Wine send the request of ejecting auxiliary input frame to Xserver.
This instance system adopts TinyX as the Xserver in system.The modification of TinyX is mainly concentrated on to the approach that obtains mouse input from kernel that cuts off.Specifically, by obtaining mouse from system kernel in original TinyX, click the code revision of input and input behavior for obtaining corresponding mouse by socket from WineProxy.
WineProxy is the present invention's newly-established task in Android system.The function that WineProxy need to realize comprises the mouse clicking operation on monitoring screen, records the type of mouse clicking operation and concrete positional information, and is packaged into the information format of X11 system standard.In this external system, also need to realize the Socket for communication between application program and TinyX and WineProxy, and corresponding communications protocol.
WineProxy module is from the operation of screen reading mouse, and its information is stored in buffer zone, then the mouse action information exchange in buffer zone is crossed to Socket sends to TinyX to process; TinyX is responsible for the concrete processing of mouse input, the Information encapsulation of the mouse action obtaining from WineProxy is become to meet to the information format of X standard criterion, and this information exchange is crossed to Socket send to Winex11.drv.dll and process, the mouse input request that Winex11.drv.dll module is responsible for TinyX to send is converted to the form that can be identified by comctl32.dll, and the request of comctl32.dll is converted to the TinyX command format of standard.
With reference to figure 3, be depicted as and integrate Wine and Android mouse input processing process flow diagram.
Below with the soft keyboard input process in Android system as an example, illustrate method of the present invention and how to be applied in the mouse input process in Android system, realize the integration function to mouse input.
Step 301, waits for the click on screen, enters step 302;
Owing to all can adopting in a plurality of tasks of soft keyboard input in Android system, and the time of operation is unfixing, so system needs the click behavior of supervisory user on screen at any time;
Step 302, WineProxy sends to TinyX by this event by Socket, enters step 303;
When user clicks after screen, the onTouchEvent () method in WineProxy is called.The method is encapsulated as an intrasystem event by user's click, and records the particular type of click and the information of position, for later operation;
Step 303, TinyX is converted to X11 protocol format by this event, is transmitted to application process, enters step 304;
WineProxy sends to Xserver by packaged event by socket, in this instance system, be TinyX, the information now sending does not also meet the defined form TinyX of X11 agreement and this event notice is converted to the form of X11 agreement defined, and be transmitted to application process, this event and TinyX know that event when mouse state changes is of equal value, comprise click type, the information such as the particular location of click; TinyX sends to the winex11.drv.dll of application process by the click event after transforming by socket;
Step 304, Winex11.drv.dll receives after the event from TinyX, is transmitted to comctl32.dll, enters step 305;
Winex11.drv.dll in application process receives after the event from TinyX, judges it for mouse click event, subsequently the comctl32.dll that gives upper strata on it is processed;
Step 305, it is enough to drop in control able to programme that judgement is clicked, and if so, enters step 306, if not, returns to step 301,
Whether the cursor now of the X11 event judgement after the comctl32.dll on upper strata changes by encapsulation drops in certain Compilatory control, if the position of clicking belongs to not editable region, just ignore current mouse clicking operation, system state jumps back to step 301, continues to wait for the mouse clicking operation of user on screen;
Step 306, calls the api function of Winex11.drv.dll, requires to eject input frame, enters step 307;
If the position that comctl32.dll judgement mouse is clicked belongs in certain Compilatory control, just call the corresponding api function that Winex11.drv.dll provides, send the request of ejecting soft keyboard;
Step 307, waits for the click input on input frame, enters step 308;
Step 308, judging whether to click can not editing area, if so, enters step 309, if not, enters step 310;
Step 309, closes input frame, and returns to step 301;
Step 310, WineProxy obtains the position of click from the buffer zone of PosView, sends it to XServer, enters step 311;
Step 311, XServer receives the position of click, is transmitted to the Winex11.drv.dll of application process, enters step 312;
Step 312, Winex11.drv.dll sends WM_POS message to application process, enters step 313;
Step 313, application program receives WM_POS message, is back to step 307.
It should be noted that, said process can also be optimized, and TinyX can be excluded from this process in the future, allows application process directly communicate by letter with WineProxy by Winex11.drv.dll, the communication time delay of the corresponding mouse action of reduction system, the user who improves system experiences.
These embodiment are chosen and specifically described to this instructions, is in order to explain best principle of the present invention and practical application, thereby under making, technical field technician can utilize this invention best.The embodiment revising is equally also applicable to the application-specific of expection.Scope of the present invention be claims four corner with and equivalent.

Claims (1)

1. integrate a method for Wine and Android mouse input, the mouse incoming event occurring when carrying out common Linux application program in Android system is processed, and it is characterized in that, its processing procedure comprises the following steps:
Step 1, creates an agent process WineProxy and receives described mouse incoming event;
Step 2 is cut off the approach that obtains mouse input from kernel in TinyX;
Step 3 establishes a communications link between TinyX and WineProxy;
, there is mouse incoming event in step 4, WineProxy sends event notice by described communication connection to TinyX;
Step 5, TinyX will receive after described event notice, will be packaged into the Winex11.drv.dll that is sent to program process after the message of X11 agreement defined form and process;
Step 6, Winex11.drv.dll receives after the event from TinyX, judges it for mouse click event, subsequently the comctl32.dll that gives upper strata on it is processed;
Step 7, whether the cursor now of the X11 event judgement after the comctl32.dll on upper strata changes by encapsulation drops in certain Compilatory control, if the position of clicking belongs to not editable region, just ignore current mouse clicking operation, system state jumps back to step 4, continues to wait for the mouse clicking operation of user on screen; If the position that comctl32.dll judgement mouse is clicked belongs in certain Compilatory control, just call the corresponding api function that Winex11.drv.dll provides, send the request of ejecting soft keyboard;
Step 8, waits for the click input on input frame;
Step 9, judging whether to click can not editing area, if so, enters step 10, if not, enters step 11;
Step 10, closes input frame, and returns to step 4;
Step 11, WineProxy obtains the position of click from the buffer zone of PosView, sends it to XServer;
Step 12, XServer receives the position of click, is transmitted to the Winex11.drv.dll of application process;
Step 13, Winex11.drv.dll sends WM_POS message to application process;
Step 14, application program receives WM_POS message, is back to step 8.
CN201110173748.8A 2011-06-24 2011-06-24 Method for integrating Wine and Android mouse input Active CN102364434B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110173748.8A CN102364434B (en) 2011-06-24 2011-06-24 Method for integrating Wine and Android mouse input

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110173748.8A CN102364434B (en) 2011-06-24 2011-06-24 Method for integrating Wine and Android mouse input

Publications (2)

Publication Number Publication Date
CN102364434A CN102364434A (en) 2012-02-29
CN102364434B true CN102364434B (en) 2014-04-02

Family

ID=45691000

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110173748.8A Active CN102364434B (en) 2011-06-24 2011-06-24 Method for integrating Wine and Android mouse input

Country Status (1)

Country Link
CN (1) CN102364434B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103257893B (en) * 2013-05-28 2016-06-15 腾讯科技(深圳)有限公司 A kind of methods, devices and systems obtaining input state-event
CN105404547A (en) * 2014-09-12 2016-03-16 阿里巴巴集团控股有限公司 Fusion method and device of operating system
CN105573816B (en) * 2015-12-11 2018-12-21 北京奇虎科技有限公司 The method, apparatus and system virtually inputted
CN105677329B (en) * 2015-12-30 2018-12-14 联想(北京)有限公司 A kind of control method and electronic equipment
CN110018917B (en) * 2019-04-11 2023-07-28 深圳市智微智能科技股份有限公司 Method, system, terminal and storage medium for realizing independent mouse input channel
CN112558841B (en) * 2020-09-29 2022-05-20 统信软件技术有限公司 Application icon management method, computing device and readable storage medium
CN112231017B (en) * 2020-10-27 2021-06-22 北京技德系统技术有限公司 Virtual keyboard and mouse method and device compatible with Android running environment running on Linux

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101510125A (en) * 2009-03-30 2009-08-19 东南大学 Method for implementing computer keyboard mouse action control using mobile phone by bluetooth
CN101968746A (en) * 2010-09-02 2011-02-09 北京航空航天大学 Method for implementing organizational architecture mode of kernel-based virtual machine (KVM)
CN102073542A (en) * 2010-12-22 2011-05-25 浙大网新科技股份有限公司 Method for integrating Chinese input method during operation of Linux applications on Android mobile phone

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100050112A1 (en) * 2008-08-22 2010-02-25 Inventec Corporation System and method of immediate translation display

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101510125A (en) * 2009-03-30 2009-08-19 东南大学 Method for implementing computer keyboard mouse action control using mobile phone by bluetooth
CN101968746A (en) * 2010-09-02 2011-02-09 北京航空航天大学 Method for implementing organizational architecture mode of kernel-based virtual machine (KVM)
CN102073542A (en) * 2010-12-22 2011-05-25 浙大网新科技股份有限公司 Method for integrating Chinese input method during operation of Linux applications on Android mobile phone

Also Published As

Publication number Publication date
CN102364434A (en) 2012-02-29

Similar Documents

Publication Publication Date Title
CN102364434B (en) Method for integrating Wine and Android mouse input
WO2019174474A1 (en) Lag information acquisition method and device and terminal
US11803451B2 (en) Application exception recovery
TWI601055B (en) A unified extensible firmware interface (uefi) basic input/output system (bios)-controlled computing device and method and non-transitory medium thereof
CN102073542B (en) Method for integrating Chinese input method during operation of Linux applications on Android mobile phone
CN109308241B (en) Method and device for monitoring starting process of application program, terminal equipment and storage medium
CN102331927A (en) Method for integrating soft keyboard input of Wine and Android mobile phone
CN103399761A (en) Firmware burn method and firmware burn device
CN103729373A (en) Database agency method and device
US11621888B2 (en) Techniques for migrating worker nodes to a new manager instance
US11966795B2 (en) Method and device for loading minus-one screen, terminal, and computer readable storage medium
CN105487869A (en) Vehicular double-system device and starting method thereof
US9293108B2 (en) Transmission apparatus and system of using the same
CN108347452A (en) The long-range method and device for obtaining screenshot capture
CN102404633A (en) Monitoring module, intelligent television system and television
CN111713176B (en) Data transmission method and terminal
CN103927222A (en) Graph coprocessing method and graph coprocessing system used for client side and server side
CN104035768A (en) System and method for Android platform to be compatible with local code OpenGL program
CN102455910A (en) GUI (Graphical User Interface) platformization realization method orienting to IC (Integrated Circuit) equipment control software
CN113448650A (en) Live broadcast function plug-in loading method, device, equipment and storage medium
CN109683875B (en) Application framework system of MVC (model view controller) pattern in distributed environment and method thereof
CN115454296B (en) Intelligent fusion method for user behaviors in cross-operation environment
CN104717249A (en) Method for issuing remote operation application, proxy server and system
CN111988382B (en) Method and system for performing application interface interaction across terminals
CN113656196B (en) Method and device for transferring files between applications of Linux compatible with Android

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant