CN102331927B - Method for integrating soft keyboard input of Wine and Android mobile phone - Google Patents

Method for integrating soft keyboard input of Wine and Android mobile phone Download PDF

Info

Publication number
CN102331927B
CN102331927B CN201110172844.0A CN201110172844A CN102331927B CN 102331927 B CN102331927 B CN 102331927B CN 201110172844 A CN201110172844 A CN 201110172844A CN 102331927 B CN102331927 B CN 102331927B
Authority
CN
China
Prior art keywords
soft keyboard
wine
event
service processes
drv
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
CN201110172844.0A
Other languages
Chinese (zh)
Other versions
CN102331927A (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 CN201110172844.0A priority Critical patent/CN102331927B/en
Publication of CN102331927A publication Critical patent/CN102331927A/en
Application granted granted Critical
Publication of CN102331927B publication Critical patent/CN102331927B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Input From Keyboards Or The Like (AREA)

Abstract

The invention discloses a method for integrating soft keyboard input of a Wine and an Android mobile phone. The method comprises the following steps that: 1, a Wine proxy transmits an event notice to an X window service process when a soft keyboard event happens; 2, the X window service process converts the event notice according to a preset format and transmits the converted event notice to a keyboard/mouse input processing program in a Winex11.drv; 3, the Winex11.drv submits the soft keyboard event to a public control management module, and the public control management module determines to pop a soft keyboard; and 4, the X window service process forwards the soft keyboard popping request of the Wine to the Wine proxy, and the Wine proxy performs soft keyboard popping operation. The problem of integrating the soft keyboard input of the Wine and an Android/open mobile system (OMS) and the problems of timing and paths of popping and closing the soft keyboard are solved at the same time.

Description

The integration method of Wine and the input of Android Soft keyboard for handset
Technical field
The present invention relates to moving communicating field, relate in particular to the integration method of Wine and the input of Android Soft keyboard for handset.
Background technology
Intelligent mobile terminal device take mobile phone as representative is an important development direction of computer technology, is again the market that competition is very fierce.Since Google and open mobile phone alliance's release Android operating system and the mobile phone based on Androuid, on world's mobile phone market, occupy soon no small share, various Android mobile phones emerge in an endless stream, and the OPhone that is developed and released by China Mobile is also a kind of Android mobile phone.
So-called Android operating system, be actually the one reorganization to (SuSE) Linux OS and expand, its kernel is exactly the kernel of Linux substantially, but but do significantly improve and strengthen for the feature of mobile phone and mobile terminal device specially at user's space, these change mostly with programming mode and graphical interfaces, graphic user interface (GUI) is relevant.
The operating system that another kind is usually used in mobile phone is WinCE and the WM (Windows Mobile) of Microsoft, and this is to grow up in the Windows of Microsoft operating system.Mobile phone based on WinCE/WM also accounts for no small share on market, and has developed the no small WinCE/WM application software of quantity.If these application software can be taken on Android mobile phone and moved, be obviously favourable for the market share that improves Android mobile phone.
Wine is the simulator software under a outstanding linux system platform, is used for the stable operation under linux system of the software under Windows system, and this software upgrading is frequent, becomes better and approaching perfection day by day, and can move the software under many large-scale Windows systems.After on the Linux platform of Wine being transplanted to ARM framework, WinCE/WM application software can be moved under the support of Wine on the Linux platform that adopts arm processor, equally also can move at Android platform.
In the (SuSE) Linux OS with graphical interfaces, about the function of graphical interfaces is all provided by X windows system, input method is also a part for graphical interfaces function.The process of moving application software does not directly read keyboard input, and just obtains input by interprocess communication from X service processes.The input of man-machine interaction is first read by X service processes unique in native system, by the processing in unified in addition early stage of X service processes, then provides and delivers to suitable process/thread according to the current location of onscreen cursor and current form in " focusing " state.
X form belongs to another open source software project, exists as far back as the Unix epoch.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 phone and other embedded system, people also by the in addition cutting of X form, reduce the staff, simplify, the version that becomes a miniaturization is called TinyX, so TinyX is X windows system special and built-in Linux pairing use.
But different from conventional Linux platform, Android/OMS platform does not use TinyX, do not support the Linux application that relies on X form service processes (Xserver) that GUI is provided yet.On Android/OMS platform, all inputs from keyboard and Genius mouse are are all intercepted and captured by " window manager " thread, then are distributed to current " application (Activity) " moving by this thread.So just draw keyboard input problem how to integrate Wine and Android/OMS.Because TinyX and Android will fight for the input from keyboard and Genius mouse, also can do things in his own way and draw on screen.
The problem of integrating for solving Wine and the input of Android/OMS soft keyboard, the procedural model of original China Mobile is in the time of operation WinCE/WM application, also start the agency of a Java process as Wine at Android, be called wineproxy, and make to be intercepted and captured by Android from the input unification of keyboard/mouse device, given wineproxy, and the latter will be transmitted to Xserver from the input of keyboard/mouse device.By so a kind of message transfer mode, guarantee the one-way flow of message, avoid the multiple transmission of message occurs and the confusion that causes with conflict.
But this scheme and afterwards the checking prototype of proposition also have a lot of problems to need to solve actually, wherein the most important thing is the problem of wanting (on screen) ejection soft keyboard when, when should not ejecting again soft keyboard.
Summary of the invention
For the above-mentioned problems in the prior art, the invention provides the integration method of Wine and the input of Android Soft keyboard for handset.
The integration method that the invention provides Wine and the input of Android Soft keyboard for handset, comprising:
Step 1, in the time there is soft keyboard event, Wine agency sends event notice to X form service processes;
Step 2, after X form service processes is changed event notice according to predetermined form, is sent to the keyboard/mouse device input processing program in Winex11.drv by the event notice after conversion;
Step 3, Winex11.drv will send to public control administration module in soft keyboard event, and public control administration module determines to eject soft keyboard;
Step 4, the ejection soft keyboard request from Wine is transmitted to Wine agency by X form service processes, and Wine agency carries out and ejects the operation of software dish.
In one example, Android mobile phone is Ophone mobile phone.
In one example, in step 1, in the time there is soft keyboard event, call function Wine agency's function onTouchEvent ().
In one example, in step 1, Wine agency is sent to X form service processes by socket by software dish event.
In one example, in step 2, the event notice after conversion is sent to application process by X form service processes.
In one example, in step 3, the Winex11.drv.dll in application process submits event notice to the comctl32.dll of public control administration module.
In one example, in step 3, comctl32.dll judges that cursor drops in Compilatory control, determines to eject soft keyboard.
In one example, in step 3, the request of ejecting soft keyboard is sent to X form service processes by Winex11.drv.dll.
In one example, in step 4, X form service processes carries out, after format conversion, the request of ejecting soft keyboard is transmitted to Wine agency.
In one example, also comprise:
Step 5, user presses after certain key of soft keyboard, calls the function onTextChange () of WineProxy;
Step 6 is obtained the character of key entry from the buffer zone of TextView, and sends it to X form service processes;
Step 7, character is transmitted to the Winex11.drv.dll in application process by X form service processes;
Step 8, Winex11.drv.dll sends a WM_CHAR message to application process;
Step 9, application process receives WM_CHAR message; User clicks enter key or clicks not editable interval, closes soft keyboard.
The invention enables man-machine interaction input unified flow through Wine service processes (Wineserver) and Xserver, being received rear execution ejection soft keyboard by agent process again works, in whole process, only has processing and the dispensing mechanism of a set of input message, solve Wine and the Android/OMS integration problem about soft keyboard input, solved ejection simultaneously, closed opportunity and the approach problem of soft keyboard.
Accompanying drawing explanation
Below in conjunction with accompanying drawing, the present invention is described in further detail, wherein:
Fig. 1 is the basic framework schematic diagram of system when Wine is transplanted to the Linux platform of ARM framework and moves WinCE/WM application program;
Fig. 2 is the schematic flow sheet of the keyboard input operation after application of softkeys dish integrated scheme.
Embodiment
On the basis of the simple program prototype that the present invention proposes in original China Mobile, improved, realized a kind of complete integrated scheme.
First this scheme is cut off Xserver and is obtained the approach of the input of soft keyboard, and in the time of operation WinCE/WM application, Android starts the act on behalf of wineproxy of a process as Wine, the scheme of this and China Mobile is similar, but this agency must communicate by letter with Xserver, for this reason, between model itself and Xserver, set up Socket and be connected, and define one group of communication protocol simply.Improve the agreement between Wine and Xserver simultaneously, and provide an API to make Wine to eject soft keyboard to Xserver request.Now, as long as one keyboard input occurs, Wine just sends event notice to Xserver, and the keyboard/mouse that makes the latter regard kernel is inputted, and on send to the decision of public space administration and supervision authorities and whether eject soft keyboard.Xserver is submitted to it by the ejection soft keyboard request of Wine and acts on behalf of wineproxy afterwards, and the latter can carry out ejection soft keyboard operation.And after soft keyboard ejects, the button operation of soft keyboard is also returned to the message transmission path by contrary, finally arrive WinCE/WM application, caught by it.
The main points of this method are:
1), in the code of Xserver, cut off the approach that obtains the input of keyboard/mouse device from kernel.
2), between Xserver and Wineproxy, set up a pair of Socket, and define a set of simple communication protocol.
3), the communication protocol between Xserver and Wine is expanded, and in Winex11.drv.dll, increase an api function, make Wine eject software dish to Xserver request.
4), one there is keyboard/mouse device event, Wineserver just sends event notice to Xserver.
5), obtain after the event notice from Wineserver, Xserver is used as the keyboard/mouse device input from kernel, sends to the keyboard/mouse device input processing program in Winex11.drv after changing into the message of Xserver form.Keyboard/mouse device input processing program is a section in Winex 11.drv carries out branch code according to difference input type of message.If find that the message of sending here is the message of Xserver form, handling procedure is directly given upper strata.Like this this input processing program is exactly:
If is the message of Xserver form, and message content is touchEvent:
It is public space management that Then directly meets at message comctl32.dll
Else: other events, process according to original processing code.
6), Winex11.drv manages this one deck by sending to public control in input, determines whether to need to eject soft keyboard by public control administrative mechanism.
7), the ejection soft keyboard request from Wine is transmitted to Wineproxy by Xserver, carried out the operation of ejecting software dish by the latter.
Fig. 1 is by the software system architecture of the background in the present invention.Horizontal dotted line in figure represents the boundary of user's space and system space, and dotted line is user's space above, is below system space.Each circle in figure is representing a process, and wherein that maximum circle representative is moving that process of WinCE/WM application; This circle is divided into upper and lower two parts, represents that this process is that the EXE reflection applied by WinCE/WM and all quilts (directly or indirectly) are dynamically connected to that two parts of DLL of this reflection are common to be formed.Except moving the process of WinCE/WM application, in system, at least also have two processes, one is Wineserver, is exactly Wine server processes, another is Xserver, is exactly the server processes of TinyX.Why WinCE/WM application process can be moved on linux kernel, is because there is the support of Wineserver and DLL.And why WinCE/WM application process can obtain keyboard input and Genius mouse input, why can be on screen display graphics, be because of the existence that has Xserver.In conventional linux system, all by Xserver is intercepted and captured, then be distributed to the current process being focused on by Xserver from the input of keyboard and Genius mouse.
Fig. 2 is the complete structure schematic diagram by the method for the invention, is only connected by chain type path as we can see from the figure between modules, avoids confusion that message transmits and conflicts.Between interim Wine and Xserver (TinyX), intercom mutually by the socket communication protocol of definition between Tinx and Wineproxy.
According to integrated scheme, need to carry out following modification to code:
1), the proxy interface of definition WineProxy comprises communication function and controls soft keyboard the abstract function that ejects functions such as closing.
2), these functions of specific implementation, wherein communication function in need to set up socket connection come communicate by letter with Xserver.
3) in Xserver, also define, equally socket connection, now can, by self-defining communication protocol, create some events, such as the audiomonitor (Listener) of the key-press event such as keyboard, Genius mouse.
4), in event response function by the event format transformation of receiving, corresponding application program can be identified, if ask/close the event of soft keyboard, notify the ejection of WineProxy/close soft keyboard operation.
5), add the function of communicating by letter with upper strata dll in Xserver, the request of completing judges the communication task such as mouse region, input character forwarding.
By realizing after above-mentioned functions, the flow process of a complete soft keyboard input operation is as follows:
1. user clicks certain interval on screen.
The onTouchEvent () of 2.WineProxy is called.
3.WineProxy sends to Xserver by this event by socket, i.e. TinyX.
4.Xserver converts this event notice to the form of X11 agreement defined, and is transmitted to application process, and this event and Xserver are known event equivalence when keyboard/mouse device state changes.
5. the Winex11.drv.dll in application process receives after the event from Xserver, will on it, give the comctl32.dll on upper strata.
6. upper strata DLL checks whether cursor now drops in certain Compilatory control, if just call the api function that Winex11.drv.dll provides, requires to eject soft keyboard.
7.Winex11.drv.dll the requirement of ejecting soft keyboard is sent to Xserver.
8.Xserver carries out, after format conversion, request is transmitted to WineProxy.
9.WineProxy ejects soft keyboard.
10. user presses certain key on soft keyboard.
The onTextChange () of 11.WineProxy is called, and obtains the character of key entry from the buffer zone of its TextView, and sends it to Xserver.
12.Xserver receives the input character from WineProxy, is transmitted to the Winex11.drv.dll in application process.
13.Winex11.drv.dll send a WM_CHAR message to application process.
14. application processes receive WM_CHAR message.
15. users click enter key or click not editable interval, close soft keyboard.
The present invention is by adopting a unified mechanism, come input and the screen output of supervisory keyboard/Genius mouse, make TinyX and the Android not conflict mutually in the time that soft keyboard is pressed, solved the problem of when wanting (on screen) to eject soft keyboard and when should not eject soft keyboard simultaneously.
The foregoing is only the preferred embodiment of the present invention, but protection domain of the present invention is not limited to this.Any those skilled in the art, in technical scope disclosed by the invention, all can carry out suitable change or variation to it, and this change or change all should be encompassed in protection scope of the present invention within.

Claims (6)

  1. The integration method of 1.Wine and the input of Android Soft keyboard for handset, is characterized in that, comprising:
    Step 1, in the time there is soft keyboard event, Wine agency sends event notice to X form service processes;
    Step 2, after X form service processes is changed event notice according to predetermined form, is sent to the keyboard/mouse device input processing program in Winex11.drv by the event notice after conversion;
    Step 3, Winex11.drv will send to the comctl32.dll of public control administration module in soft keyboard event, comctl32.dll judges that cursor drops in Compilatory control, determines to eject soft keyboard, and the request of ejecting soft keyboard is sent to X form service processes by Winex11.drv.dll;
    Step 4, the ejection soft keyboard request from Wine is transmitted to Wine agency by X form service processes, and Wine agency carries out and ejects soft keyboard operation;
    Step 5, user presses after certain key of soft keyboard, calls Wine agency's function onTextChange ();
    Step 6 is obtained the character of key entry from the buffer zone of TextView, and sends it to X form service processes;
    Step 7, character is transmitted to the Winex11.drv.dll in application process by X form service processes;
    Step 8, Winex11.drv.dll sends a WM_CHAR message to application process;
    Step 9, application process receives WM_CHAR message; User clicks enter key or clicks not editable interval, closes soft keyboard.
  2. 2. integration method as claimed in claim 1, is characterized in that, Android mobile phone is Ophone mobile phone.
  3. 3. integration method as claimed in claim 1 or 2, is characterized in that, in step 1, and in the time there is soft keyboard event, call function Wine agency's function onTouchEvent ().
  4. 4. integration method as claimed in claim 3, is characterized in that, in step 1, Wine agency is sent to X form service processes by socket by soft keyboard event.
  5. 5. integration method as claimed in claim 4, is characterized in that, in step 2, the event notice after conversion is sent to application process by X form service processes.
  6. 6. integration method as claimed in claim 5, is characterized in that, in step 4, X form service processes carries out, after format conversion, the request of ejecting soft keyboard is transmitted to Wine agency.
CN201110172844.0A 2011-06-24 2011-06-24 Method for integrating soft keyboard input of Wine and Android mobile phone Active CN102331927B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110172844.0A CN102331927B (en) 2011-06-24 2011-06-24 Method for integrating soft keyboard input of Wine and Android mobile phone

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110172844.0A CN102331927B (en) 2011-06-24 2011-06-24 Method for integrating soft keyboard input of Wine and Android mobile phone

Publications (2)

Publication Number Publication Date
CN102331927A CN102331927A (en) 2012-01-25
CN102331927B true CN102331927B (en) 2014-06-25

Family

ID=45483713

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110172844.0A Active CN102331927B (en) 2011-06-24 2011-06-24 Method for integrating soft keyboard input of Wine and Android mobile phone

Country Status (1)

Country Link
CN (1) CN102331927B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102637127B (en) * 2012-02-24 2015-04-08 青岛海信电器股份有限公司 Method for controlling mouse modules and electronic device
CN104503656B (en) * 2014-12-05 2019-01-15 蓝信移动(北京)科技有限公司 A kind of method and apparatus for instant messaging information input
CN105183455B (en) * 2015-08-13 2018-09-21 深圳市广和通无线股份有限公司 A kind of method and system integrating JT/T808 programs under Android platform
CN105573816B (en) * 2015-12-11 2018-12-21 北京奇虎科技有限公司 The method, apparatus and system virtually inputted
CN105912348A (en) * 2016-06-02 2016-08-31 浪潮软件集团有限公司 Method for self-adapting position of mobile phone APP software text box along with soft keyboard
CN108304131B (en) * 2018-01-09 2019-10-25 武汉斗鱼网络科技有限公司 Keyboard optimized treatment method, storage medium, electronic equipment and system
CN112988029B (en) * 2019-12-17 2023-05-30 中标软件有限公司 Implementation method for starting soft keyboard on login interface
CN111190599A (en) * 2019-12-30 2020-05-22 久盈世纪(北京)科技有限公司 Method and device for realizing android self-defined soft keyboard by using Dialog and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1731347A (en) * 2004-08-06 2006-02-08 梁肇新 Linux-based Windows software compatible layer architecture
CN101303644A (en) * 2007-05-08 2008-11-12 西北民族大学 Brahma-sutra Tibetan input method based on Windows OS and Linux OS
US7945915B1 (en) * 2006-12-12 2011-05-17 Oracle America, Inc. Efficient operating system interposition mechanism
CN102073542A (en) * 2010-12-22 2011-05-25 浙大网新科技股份有限公司 Method for integrating Chinese input method during operation of Linux applications on Android mobile phone
CN102123196A (en) * 2010-12-29 2011-07-13 浙大网新科技股份有限公司 Method for realizing WinCE/Android mixed API (Application Programming Interface) on Android cell phone
CN102129369A (en) * 2010-12-22 2011-07-20 浙大网新科技股份有限公司 Method for integrating TinxX pattern interface on Android mobile phone

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1731347A (en) * 2004-08-06 2006-02-08 梁肇新 Linux-based Windows software compatible layer architecture
US7945915B1 (en) * 2006-12-12 2011-05-17 Oracle America, Inc. Efficient operating system interposition mechanism
CN101303644A (en) * 2007-05-08 2008-11-12 西北民族大学 Brahma-sutra Tibetan input method based on Windows OS and Linux OS
CN102073542A (en) * 2010-12-22 2011-05-25 浙大网新科技股份有限公司 Method for integrating Chinese input method during operation of Linux applications on Android mobile phone
CN102129369A (en) * 2010-12-22 2011-07-20 浙大网新科技股份有限公司 Method for integrating TinxX pattern interface on Android mobile phone
CN102123196A (en) * 2010-12-29 2011-07-13 浙大网新科技股份有限公司 Method for realizing WinCE/Android mixed API (Application Programming Interface) on Android cell phone

Also Published As

Publication number Publication date
CN102331927A (en) 2012-01-25

Similar Documents

Publication Publication Date Title
CN102331927B (en) Method for integrating soft keyboard input of Wine and Android mobile phone
CN102073542B (en) Method for integrating Chinese input method during operation of Linux applications on Android mobile phone
US20240012562A1 (en) Control method applied to screen projection scenario and related device
WO2021093619A1 (en) Method, device and medium relating to android system dual-screen display multi-input device
CN112041791B (en) Method and terminal for displaying virtual keyboard of input method
CN103493010B (en) Cross-environment event notification
CN109391648A (en) It is a kind of to apply correlating method, device and the communication system being sliced with network
CN100479389C (en) Module and method for realizing equipment access interface, equipment access system and method
US20130212489A1 (en) Method for Providing Multiple Mouse Inputs in a Remote Desktop Session
CN102123196B (en) Method for realizing WinCE/Android mixed API (Application Programming Interface) on Android cell phone
CN102364434B (en) Method for integrating Wine and Android mouse input
US20230195298A1 (en) Permission setting method and apparatus and electronic device
WO2020001193A1 (en) Gesture recognition method and apparatus, readable storage medium and mobile terminal
CN111880675B (en) Interface display method and device and electronic equipment
CN113238687B (en) Method and device for realizing android application button function on desktop platform
CN113268212A (en) Screen projection method and device, storage medium and electronic equipment
CN102184076B (en) Method and device for controlling input of mobile terminal specific to JAVA program
WO2023273403A1 (en) Method for implementing non-intrusive communication service on android platform
CN101452403A (en) Drawing support method and device
CN108182066A (en) One kind is based on embedded system locomotive platform kernel implementation method
WO2020015571A1 (en) Mobile terminal, method for running application in background, and device
WO2023001027A1 (en) Task synchronization method and apparatus, device, and readable storage medium
CN110389794A (en) Method, storage medium and the terminal of information sharing are established between a kind of plug-in unit
CN111988382B (en) Method and system for performing application interface interaction across terminals
CN103777959A (en) Use method of virtual mouse

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