Touch data processing method, apparatus, device and storage medium
The present disclosure provides a touch data processing method, apparatus, device and storage medium. A display content from the second operating system is displayed on a display interface of the first operating system, and after a touch screen on a device where the first operating system is located is rotated by a preset angle, if a touch operation on the touch screen is detected, whether the touch operation is an operation on a display content in the target display area is determined; if yes, touch data corresponding to the touch operation can be sent to the second operating system, so that the second operating system responds to the touch operation. The present disclosure realizes that even if the touch screen on the device where the first operating system is located is rotated, the second operating system can be controlled to respond to the touch operation by touching the touch screen.
1 . A touch data processing method for an interactive white board, comprising:
displaying a display content from a second operating system on a display interface of a first operating system, wherein the display content is displayed in a target display area of the display interface of the first operating system of the interactive white board, and the second operating system is a system on the interactive white board different from the first operating system;
after a touch screen of the interactive white board is rotated by a preset angle, and in response to a touch operation on the touch screen being detected,
acquiring touch-position information by:
acquiring system-position information of the target display area under a systematic coordinate system of the first operating system through a system interface;
acquiring screen-position information of the target display area under a screen coordinate system of the first operating system by mapping the system-position information to the screen-position information according to a relationship between the systematic coordinate system and the screen coordinate system; and
acquiring the touch-position information of the target display area under a touch-box coordinate system of the first operating system by mapping the screen-position information to the touch-position information according to a relationship between the screen coordinate system and the touch-box coordinate system,
wherein:
an origin of the systematic coordinate system of the first operating system is configured to change with a rotation of the touch screen,
an origin of the screen coordinate system of the first operating system is configured to not change with a rotation of the touch screen, and
an origin of the touch-box coordinate system of the first operating system is configured to not change with a rotation of the touch screen;
wherein:
a width and height of the touch-box coordinate system depend on a precision of the touch screen,
a width and height of the systematic coordinate system depend on a resolution of the screen, and
a width and height of the screen coordinate system depend on the resolution of the screen;
determining whether the touch operation is an operation on the display content in the target display area according to a relationship between the touch operation and the touch-position information; and
in response to the touch operation being an operation on the display content in the target display area,
converting touch data, which comprise a touch position of the touch operation in the touch-box coordinate system, according to a coordinate system of the second operating system, and
sending the touch data from the first operating system to the second operating system, so that the second operating system responds to the touch operation.
2 . The touch data processing method according to claim 1 , wherein the method further comprises:
in response to the touch operation being an operation on the display content in the target display area, displaying an updated display content in the target display area, wherein the updated display content is obtained by the second operating system updating the display content based on the touch operation, or obtained by the first operating system updating the display content based on the touch operation.
3 . The touch data processing method according to claim 1 , wherein at least one of a floating window or a control for controlling a display state of the target display area is displayed in the target display area, and in response to the touch operation being an operation acting on at least one of the floating window or the control in the target display area, the touch operation is responded to by the first operating system.
4 . The touch data processing method according to claim 1 , wherein the method further comprises:
after a display position of the target display area is adjusted, in response to the touch operation being an operation on the display content in an adjusted target display area, the touch data of the touch operation is sent to the second operating system, so that the second operating system responds to the touch operation.
5 . A touch data processing method for an interactive white board, comprising:
displaying a display content from a second operating system on a display interface of a first operating system, wherein the display content is displayed in a target display area of the display interface of the first operating system of the interactive white board, and the second operating system is a system on the interactive white board different from the first operating system;
in response to a touch screen of the interactive white board being rotated by a preset angle, and in response to a touch operation on the display interface of the first operating system being detected, acquiring touch-position information by:
acquiring system-position information of the target display area under a systematic coordinate system of the first operating system through a system interface; and
acquiring the touch-position information of the target display area under a touch-box coordinate system of the first operating system by mapping the system-position information according to a relationship between the systematic coordinate system and the touch-box coordinate system,
wherein:
an origin of the systematic coordinate system of the first operating system is configured to change with a rotation of the touch screen, and
an origin of the touch-box coordinate system of the first operating system is configured to not change with a rotation of the touch screen;
wherein:
a width and height of the touch-box coordinate system depend on a precision of the touch screen, and
a width and height of the systematic coordinate system depend on a resolution of the screen;
determining whether the touch operation is an operation on the display content in the target display area according to a relationship between the touch operation and the touch-position information; and
in response to the touch operation being an operation on the display content in the target display area,
converting touch data, which comprise a touch position of the touch operation in the touch-box coordinate system, according to a coordinate system of the second operating system, and
sending the touch data from the first operating system to the second operating system, so that the second operating system responds to the touch operation.
6 . The touch data processing method according to claim 5 , wherein the touch-position information is updated after a display position of the target display area is adjusted.
7 . The touch data processing method according to claim 5 , wherein
a relationship between the systematic coordinate system and a screen coordinate system comprises: a relationship between the systematic coordinate system and the screen coordinate system after the touch screen is rotated by a first angle along a first direction.
8 . The touch data processing method according to claim 5 , wherein at least one of a floating window or a control for controlling a display state of the target display area is displayed in the target display area, and in response to the touch operation being an operation acting on at least one of the floating window or the control in the target display area, the touch operation is responded to by the first operating system.
9 . The touch data processing method according to claim 8 , wherein a condition of determining that the touch operation is an operation on the display content in the target display area comprises:
the touch operation is an operation on the target display area; or
the touch operation is an operation on the target display area, and is not an operation on a shield area, wherein the shield area is at least one of an area where the floating window is located or an area where the control for controlling the display state of the target display area is located in the target display area.
10 . The touch data processing method according to claim 9 , wherein a process of determining that the touch operation is an operation on the target display area comprises:
in response to detecting a touch object performing a touch-down event, determining that the touch position of the touch object during the touch operation is inside the target display area, wherein the touch-down event is an event that occurs during the touch object performing a continuous touch operation.
11 . The touch data processing method according to claim 10 , wherein in response to a full-screen content of the second operating system being displayed in the target display area, sending the touch data corresponding to the touch operation to the second operating system comprises:
in response to the touch position of the touch object being inside the target display area when the touch object performs a touch-down event, and the touch position being inside the target display area during a process of the continuous touch operation, according to a preset relationship between the touch-box coordinate system of the first operating system and a coordinate system of the second operating system, converting touch data of the touch position inside the target display area into touch data under the coordinate system of the second operating system;
in response to the touch position of the touch object being inside the target display area when the touch object performs a touch-down event, and the touch position being outside the target display area during the process of the continuous touch operation, converting touch data of the touch position outside the target display area into touch data closest to an edge of the target display area, and according to the preset relationship between the touch-box coordinate system of the first operating system and the coordinate system of the second operating system, converting the converted touch data closest to the edge of the target display area into touch data under the coordinate system of the second operating system; and
sending the converted touch data under the coordinate system of the second operating system to the second operating system.
12 . The touch data processing method according to claim 10 , wherein in response to a content in a partial area of a screen of the second operating system being displayed in the target display area, sending the touch data corresponding to the touch operation to the second operating system comprises:
in response to the touch position of the touch object being inside the target display area when the touch object performs a touch-down event, and the touch position being inside the target display area during the process of the continuous touch operation, according to a preset relationship between the touch-box coordinate system of the first operating system and a coordinate range of the partial area, converting touch data of the touch position inside the target display area into touch data under a coordinate system of the second operating system, wherein the coordinate range of the partial area refers to a coordinate range of the partial area of the screen corresponding to the coordinate system of the second operating system;
in response to the touch position of the touch object being inside the target display area when the touch object performs a touch-down event, and the touch position being outside the target display area during the process of the continuous touch operation, converting touch data of the touch position outside the target display area into touch data closest to an edge of the target display area, and according to the preset relationship between the touch-box coordinate system of the first operating system and the coordinate range of the partial area, converting the converted touch data closest to the edge of the target display area into touch data under the coordinate system of the second operating system; and
sending the converted touch data under the coordinate system of the second operating system to the second operating system.
13 . The touch data processing method according to claim 5 , wherein the method further comprises:
in response to the touch operation being not an operation on the display content in the target display area, sending touch data of the touch operation to the first operating system, and the first operating system is configured to respond to the touch operation; or
directly sending the touch data of the touch operation to the first operating system, for the first operating system to determine whether to respond to the touch operation, wherein in the case where the touch operation is an operation on the display content in the target display area, whether the first operating system responds to the touch operation is determined based on a preset strategy.
14 . The touch data processing method according to claim 5 , wherein the method further comprises:
switching an external device to the first operating system or the second operating system through the control of Universal Serial Bus (USB) Hub.
15 . An electronic device, comprising:
a memory storing computer-readable instructions; and
a processor coupled to the memory and configured to execute the computer-readable instructions, wherein the computer-readable instructions, when executed by the processor cause the processor to perform operations comprising:
displaying a display content from a second operating system on a display interface of a first operating system, wherein the electronic device is an interactive white board, wherein the display content is displayed in a target display area of the display interface of the first operating system of the interactive white board, and the second operating system is a system on the interactive white board different from the first operating system;
after a touch screen on the interactive white board is rotated by a preset angle, and in response to a touch operation on the touch screen being detected,
acquiring touch-position information by:
acquiring system-position information of the target display area under a systematic coordinate system of the first operating system through a system interface;
acquiring screen-position information of the target display area under a screen coordinate system of the first operating system by mapping the system-position information according to a relationship between the systematic coordinate system and the screen coordinate system; and
acquiring the touch-position information of the target display area under a touch-box coordinate system of the first operating system by mapping the screen-position information according to a relationship between the screen coordinate system and the touch-box coordinate system,
wherein:
an origin of the systematic coordinate system of the first operating system is configured to change with a rotation of the touch screen,
an origin of the screen coordinate system of the first operating system is configured to not change with a rotation of the touch screen, and
an origin of the touch-box coordinate system of the first operating system is configured to not change with a rotation of the touch screen;
wherein:
a width and height of the touch-box coordinate system depend on a precision of the touch screen,
a width and height of the systematic coordinate system depend on a resolution of the screen, and
a width and height of the screen coordinate system depend on the resolution of the screen;
determining whether the touch operation is an operation on the display content in the target display area according to a relationship between the touch operation and the touch-position information; and
in response to the touch operation being an operation on the display content in the target display area,
converting touch data, which comprise a touch position of the touch operation in the touch-box coordinate system, according to a coordinate system of the second operating system, and
sending the touch data corresponding to the touch operation from the first operating system to the second operating system, so that the second operating system responds to the touch operation.
16 . The electronic device according to claim 15 , wherein the operations further comprise: in response to the touch operation being an operation on the display content in the target display area, displaying an updated display content in the target display area, wherein the updated display content is obtained by the second operating system updating the display content based on the touch operation, or obtained by the first operating system updating the display content based on the touch operation.
17 . The electronic device according to claim 15 , wherein the operations further comprise: after a display position of the target display area is adjusted, in response to the touch operation being an operation on the display content in an adjusted target display area, the touch data of the touch operation is sent to the second operating system, so that the second operating system responds to the touch operation.
18 . The electronic device according to claim 17 , wherein the first operating system is an Android system, and the second operating system is a Windows system.
19 . The touch data processing method according to claim 1 , wherein:
the preset angle comprises at least one of: 90 degrees, 180 degrees, or 270 degrees;
when the interactive white board is rotated by 0 degrees, the screen coordinate system is equal to the systematic coordinate system; and
when the interactive white board is rotated clockwise by the preset angle, the systematic coordinate system is rotated counterclockwise by the preset angle relative to the screen coordinate system.