FreeRDP
Loading...
Searching...
No Matches
com.freerdp.freerdpcore.utils.Mouse Class Reference

Static Public Member Functions

static int getLeftButtonEvent (Context context, boolean down)
static int getRightButtonEvent (Context context, boolean down)
static int getMiddleButtonEvent (boolean down)
static int getMoveEvent ()
static int getScrollEvent (Context context, boolean down)
static int getScrollEvent (Context context, int amount)
static int getHScrollEvent (Context context, boolean right)
static int getHScrollEvent (Context context, int amount)

Static Public Attributes

static final int WHEEL_DELTA = 0x0078

Detailed Description

Definition at line 17 of file Mouse.java.

Member Function Documentation

◆ getHScrollEvent() [1/2]

int com.freerdp.freerdpcore.utils.Mouse.getHScrollEvent ( Context context,
boolean right )
inlinestatic

Definition at line 71 of file Mouse.java.

72 {
73 return getHScrollEvent(context, right ? WHEEL_DELTA : -WHEEL_DELTA);
74 }

◆ getHScrollEvent() [2/2]

int com.freerdp.freerdpcore.utils.Mouse.getHScrollEvent ( Context context,
int amount )
inlinestatic

Definition at line 76 of file Mouse.java.

77 {
78 if (ApplicationSettingsActivity.getInvertScrolling(context))
79 amount = -amount;
80 return wheelEvent(PTRFLAGS_HWHEEL, amount);
81 }

◆ getLeftButtonEvent()

int com.freerdp.freerdpcore.utils.Mouse.getLeftButtonEvent ( Context context,
boolean down )
inlinestatic

Definition at line 32 of file Mouse.java.

33 {
34 if (ApplicationSettingsActivity.getSwapMouseButtons(context))
35 return (PTRFLAGS_RBUTTON | (down ? PTRFLAGS_DOWN : 0));
36 else
37 return (PTRFLAGS_LBUTTON | (down ? PTRFLAGS_DOWN : 0));
38 }

◆ getMiddleButtonEvent()

int com.freerdp.freerdpcore.utils.Mouse.getMiddleButtonEvent ( boolean down)
inlinestatic

Definition at line 48 of file Mouse.java.

49 {
50 return (PTRFLAGS_MBUTTON | (down ? PTRFLAGS_DOWN : 0));
51 }

◆ getMoveEvent()

int com.freerdp.freerdpcore.utils.Mouse.getMoveEvent ( )
inlinestatic

Definition at line 53 of file Mouse.java.

54 {
55 return PTRFLAGS_MOVE;
56 }

◆ getRightButtonEvent()

int com.freerdp.freerdpcore.utils.Mouse.getRightButtonEvent ( Context context,
boolean down )
inlinestatic

Definition at line 40 of file Mouse.java.

41 {
42 if (ApplicationSettingsActivity.getSwapMouseButtons(context))
43 return (PTRFLAGS_LBUTTON | (down ? PTRFLAGS_DOWN : 0));
44 else
45 return (PTRFLAGS_RBUTTON | (down ? PTRFLAGS_DOWN : 0));
46 }

◆ getScrollEvent() [1/2]

int com.freerdp.freerdpcore.utils.Mouse.getScrollEvent ( Context context,
boolean down )
inlinestatic

Definition at line 58 of file Mouse.java.

59 {
60 return getScrollEvent(context, down ? -WHEEL_DELTA : WHEEL_DELTA);
61 }

◆ getScrollEvent() [2/2]

int com.freerdp.freerdpcore.utils.Mouse.getScrollEvent ( Context context,
int amount )
inlinestatic

Definition at line 64 of file Mouse.java.

65 {
66 if (ApplicationSettingsActivity.getInvertScrolling(context))
67 amount = -amount;
68 return wheelEvent(PTRFLAGS_WHEEL, amount);
69 }

Field Documentation

◆ WHEEL_DELTA

final int com.freerdp.freerdpcore.utils.Mouse.WHEEL_DELTA = 0x0078
static

Definition at line 30 of file Mouse.java.


The documentation for this class was generated from the following file: