FreeRDP
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Modules Pages
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 getMoveEvent ()
 
static int getScrollEvent (Context context, boolean down)
 

Detailed Description

Definition at line 17 of file Mouse.java.

Member Function Documentation

◆ getLeftButtonEvent()

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

Definition at line 29 of file Mouse.java.

30 {
31 if (ApplicationSettingsActivity.getSwapMouseButtons(context))
32 return (PTRFLAGS_RBUTTON | (down ? PTRFLAGS_DOWN : 0));
33 else
34 return (PTRFLAGS_LBUTTON | (down ? PTRFLAGS_DOWN : 0));
35 }

◆ getMoveEvent()

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

Definition at line 45 of file Mouse.java.

46 {
47 return PTRFLAGS_MOVE;
48 }

◆ getRightButtonEvent()

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

Definition at line 37 of file Mouse.java.

38 {
39 if (ApplicationSettingsActivity.getSwapMouseButtons(context))
40 return (PTRFLAGS_LBUTTON | (down ? PTRFLAGS_DOWN : 0));
41 else
42 return (PTRFLAGS_RBUTTON | (down ? PTRFLAGS_DOWN : 0));
43 }

◆ getScrollEvent()

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

Definition at line 50 of file Mouse.java.

51 {
52 int flags = PTRFLAGS_WHEEL;
53
54 // invert scrolling?
55 if (ApplicationSettingsActivity.getInvertScrolling(context))
56 down = !down;
57
58 if (down)
59 flags |= (PTRFLAGS_WHEEL_NEGATIVE | 0x0088);
60 else
61 flags |= 0x0078;
62 return flags;
63 }

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