Skip to content

Commit

Permalink
Add Synthetic Pointer injection functions to winuser (#880)
Browse files Browse the repository at this point in the history
* Add Synthetic Pointer injection functions to winuser

* Trigger new CI
  • Loading branch information
jesdazrez authored Jun 7, 2020
1 parent 0b01431 commit 052b4c7
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/um/winuser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3254,6 +3254,11 @@ pub const MAX_TOUCH_COUNT: UINT32 = 256;
pub const TOUCH_FEEDBACK_DEFAULT: DWORD = 0x1;
pub const TOUCH_FEEDBACK_INDIRECT: DWORD = 0x2;
pub const TOUCH_FEEDBACK_NONE: DWORD = 0x3;
ENUM!{enum POINTER_FEEDBACK_MODE {
POINTER_FEEDBACK_DEFAULT = 1,
POINTER_FEEDBACK_INDIRECT = 2,
POINTER_FEEDBACK_NONE = 3,
}}
extern "system" {
pub fn InitializeTouchInjection(
maxCount: UINT32,
Expand Down Expand Up @@ -3383,6 +3388,24 @@ extern "system" {
hwnd: HWND,
pointerType: POINTER_INPUT_TYPE,
) -> BOOL;
}
DECLARE_HANDLE!{HSYNTHETICPOINTERDEVICE, HSYNTHETICPOINTERDEVICE__}
extern "system" {
pub fn CreateSyntheticPointerDevice(
pointerType: POINTER_INPUT_TYPE,
maxCount: ULONG,
mode: POINTER_FEEDBACK_MODE,
) -> HSYNTHETICPOINTERDEVICE;
pub fn InjectSyntheticPointerInput(
device: HSYNTHETICPOINTERDEVICE,
pointerInfo: *const POINTER_TYPE_INFO,
count: UINT32,
) -> BOOL;
pub fn DestroySyntheticPointerDevice(
device: HSYNTHETICPOINTERDEVICE,
);
}
extern "system" {
pub fn EnableMouseInPointer(
fEnable: BOOL,
) -> BOOL;
Expand Down

0 comments on commit 052b4c7

Please sign in to comment.