Summary of the invention
Technical matters to be solved by this invention is to provide a kind of touch-screen man-machine interaction communication means and solves in prior art between touch-screen and processor communication means and realize complicated, need the programmer of bottom to write very many codes and realize, cause the low problem of touch-screen required function development efficiency.
The technical scheme that the present invention solves the problems of the technologies described above is as follows: a kind of touch-screen man-machine interaction communication means, comprisestep 1, touch the effective touch area on touch-screen, generate coordinate information by the touch-screen control module according to effective touch area and be sent to processing unit;
Step 2, processing unit receives described coordinate information, convert described coordinate information to the type of touch-control configuration-direct and the content of touch-control configuration-direct by the touch-control dispensing unit, processing unit operates according to the type of described control configuration-direct and the content of touch-control configuration-direct, and the generating run object information also is sent to display unit;
Step 3, display unit demonstrate the result after time operation is completed.
the invention has the beneficial effects as follows: after using communication means of the present invention, carried out communications portion integrated, by the touch-control configuration file, input coordinate information is converted to the content of the type of touch-control configuration-direct and touch-control configuration-direct and carries out corresponding operating, based on this, the developer can not need to be concerned about the internal processes between touch-screen and processing unit when developing required function, only need the function according to touch-control configuration-direct exploitation needs default in configuration file, greatly reduce the time of required functional development, improve program development efficient, save cost of development.
On the basis of technique scheme, the present invention can also do following improvement.
Further, the touch input mode in describedstep 1 also comprises and coordinates simultaneously the physical keyboard input mode to carry out input information.
Adopt the beneficial effect of above-mentioned further scheme to be: can select to touch the input mode of input mode or physical keyboard input mode or both cooperations, further improve development efficiency, reduce development difficulty.
Further, comprise the touch-control configuration-direct of one or more in described touch-control configuration file, every described touch-control instruction takies 16 bytes, 32 bytes or 48 bytes of storage space.
Further, the type of described touch-control configuration-direct comprises variable data enter instruction, popup menu selection instruction, incremental adjustments instruction, drags regulating command, RTC arranges instruction, key value link order, ASC I I/GBK Chinese-character text enter instruction and hardware parameter configuration-direct totally eight kinds of instruction types.
Adopt the beneficial effect of above-mentioned further scheme to be: to simplify by the code of functional development that these instructions can be conventional with some, only need call corresponding function, further saved the development time, improve touch screen program development efficiency.
Further, the content of described every touch-control configuration-direct comprises that page number, touch button zone, target switch the page, the button press effect page, Touch control key code instruction and touch control operation type.
Further, the content of described every touch-control configuration-direct also comprise the text display form, call character library I D, any one or several combination arbitrarily among keyboard place page number and keyboard area, input content restriction, data, argument pointer and form, operator scheme and cursor position and color.
Adopt the beneficial effect of above-mentioned further scheme to be: to make developer's the relevant parameter of needs input just can realize operation accordingly on touch-screen, further simplified the touch screen program performance history.
Embodiment
Below in conjunction with accompanying drawing, principle of the present invention and feature are described, example only is used for explaining the present invention, is not be used to limiting scope of the present invention.
Article one, the touch-control instruction is comprised of following part, and wherein the unit of data length is byte, and concrete form sees the following form 1:
Table 1
The variable data enter instruction is comprised of following part, and wherein the unit of data length is byte, and concrete form sees the following form 2:
Table 2
The popup menu selection instruction is comprised of following part, and wherein the unit of data length is byte, and concrete form sees the following form 3:
Table 3
The incremental adjustments instruction is comprised of following part, and wherein the unit of data length is byte, and concrete form sees the following form 4:
Table 4
Drag regulating command and be comprised of following part, wherein the unit of data length is byte, and concrete form sees the following form 5:
Table 5
RTC arranges instruction and is comprised of following part, and wherein the unit of data length is byte, and concrete form sees the following form 6:
Table 6
The key value link order is comprised of following part, and wherein the unit of data length is byte, and concrete form sees the following form 7:
Table 7
The Characters instruction comprises ASCI I Characters instruction and GBK Chinese-character text enter instruction, input the definition of required touch keyboard text keyboard code table and keypad function key, wherein the unit of data length is byte, concrete input text keyboard code table sees the followingform 8, concrete keypad function key definition sees thefollowing form 9, ASCI I Characters instruction 10, the GBK Chinese-character text enter instruction that sees the following form sees the following form 11:
Table 8
Table 9
| Key | Definition | Explanation |
| 0x00F0 | Cancel | Cancel typing and return, not the variation data. |
| 0x00F1 | Return | Confirm that typing returns, the typing text is saved in the named variable position. |
| 0x00F2 | Backspace | (backspace) deletes a character forward. |
| 0x00F3 | Delete | Delete backward 1 character. |
| 0x00F4 | CapsLock | Caps lock.If enable, corresponding button must define the effect that button is pressed. |
| 0x00F7 | Left | Character of cursor reach; Be used for page turning in the typing of GBK Chinese character. |
| 0x00F8 | Right | Move a character after cursor; Be used for page turning in the typing of GBK Chinese character. |
Table 10
Table 11
The hardware parameter configuration-direct is comprised of following part, and wherein the unit of data length is byte, and concrete form sees the following form 12:
Table 12
Wherein the operator scheme table sees the following form 13:
Table 13
As shown in Figure 1, for the inventive method process flow diagram, comprise the steps:
Step 101 touches the effective touch area on touch-screen;
Step 102 generates coordinate information by the touch-screen control module according to effective touch area, and described coordinate information is sent to processing unit;
Step 103, processing unit receives described coordinate information, convert described coordinate information to the type of touch-control configuration-direct and the content of touch-control configuration-direct by the touch-control dispensing unit, processing unit operates according to the type of described control configuration-direct and the content of touch-control configuration-direct, and the generating run object information also is sent to display unit;
Step 104, display unit demonstrate the result after time operation is completed.
By repeating said steps 101 to step 104 until all operations complete; Touch input mode in described step 101 also comprises and coordinates simultaneously the physical keyboard input mode to carry out input information; Described effective touch area is, if the upper left corner, touch area coordinate is (X1, Y1), the lower right corner, touch area coordinate is (X2, Y2), when touch coordinate is (X, Y), if X1≤X≤X2; During Y1≤Y≤Y2, be judged to be effective touch; When X≤X1, X 〉=X2, Y≤Y1 or Y 〉=Y2, be judged to be invalid touch; The touch-control configuration-direct that comprises one or more in described touch-control configuration file, every described touch-control instruction takies 16 bytes, 32 bytes or 48 bytes of storage space; The type of described touch-control configuration-direct comprises variable data enter instruction, popup menu selection instruction, incremental adjustments instruction, drags regulating command, RTC arranges instruction, key value link order, ASCII/GBK Chinese-character text enter instruction and hardware parameter configuration-direct totally eight kinds of instruction types; The content of described every touch-control configuration-direct comprises that page number, touch button zone, target switch the page, the button press effect page, Touch control key code instruction and touch control operation type; The content of described every touch-control configuration-direct also comprises the text display form, calls character library ID, any one or several combination arbitrarily among keyboard place page number and keyboard area, input content restriction, data, argument pointer and form, operator scheme and cursor position and color.
Fig. 2 is that illustration is implemented in variable data typing of the present invention, is specially first number to locate to touch at IC-card to click, and is effectively touching in the touch area, and wherein touch scope is Xs≤X≤Xe; Ye≤Y≤Ys, after being returned results by processor, by touching right-hand component word keyboard input numeral, confirmation after completing is inserted IC-card and number is located, wherein in input process, effective key is: 0x0030-0x0039,0x002E(.), 0x002D (+/-), 0x00F0(cancels), 0x00F1(confirms), the 0x00F2(backspace).
Fig. 3 is that popup menu of the present invention selects to implement illustration, be specially the button click menu, the menu that ejects is on other interface, and " unlatchings " with " closes that " key of two button arrangement (0x0000-0x00FE) will be returned to 0x01 push button variable pointed; It is 0x00FF that cancel button arranges key, can rreturn value during click.
Fig. 4 is that incremental adjustments of the present invention is implemented illustration, is specially "+", " " two push buttons are configured to respectively ++ increment (Adj_mode=0x01) and--increment (Adj_mode=0x00).And when scope is set to 0-1, coordinates variable of icon to show and to design easily the final election function
Fig. 5 is that the present invention drags adjusting enforcement illustration, is specially in figure, and the scale slide block is realized with slide block graduation indication (0x02 variable).The advantage that drags typing is directly perceived, quick, and parameter can not crossed the border.When needs drag typing more accurately, can use the variable that drags modification simultaneously data variable display mode (0x10 variable) to show.
Fig. 6 is that RTC of the present invention arranges the enforcement illustration, is specially keyboard area: upper left corner coordinate (Xs, Y s), lower right corner coordinate (Xe, Ye); Only effective when KB_Source is not equal to 0x00, keyboard is at the current page display position, upper left corner coordinate; Only effective when KB_Source is not equal to 0x00.
Fig. 7 is that Characters of the present invention is implemented illustration, be specially by predefined keyboard with touch screen and carry out Characters, wherein the keyboard upper left corner just shows the project in typing, just demonstrating alternative word under the project of typing and between the first row keyboard, select corresponding word to carry out Characters by touching corresponding word, the definition of keyboard with touch screen comprises that table 8 is to four tables of table 11.
The above is only preferred embodiment of the present invention, and is in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of doing, is equal to replacement, improvement etc., within all should being included in protection scope of the present invention.