11 package com.freerdp.freerdpcore.utils;
13 import android.content.Context;
15 import com.freerdp.freerdpcore.presentation.ApplicationSettingsActivity;
20 private final static int PTRFLAGS_LBUTTON = 0x1000;
21 private final static int PTRFLAGS_RBUTTON = 0x2000;
23 private final static int PTRFLAGS_DOWN = 0x8000;
24 private final static int PTRFLAGS_MOVE = 0x0800;
26 private final static int PTRFLAGS_WHEEL = 0x0200;
27 private final static int PTRFLAGS_WHEEL_NEGATIVE = 0x0100;
29 public static int getLeftButtonEvent(Context context,
boolean down)
32 return (PTRFLAGS_RBUTTON | (down ? PTRFLAGS_DOWN : 0));
34 return (PTRFLAGS_LBUTTON | (down ? PTRFLAGS_DOWN : 0));
37 public static int getRightButtonEvent(Context context,
boolean down)
40 return (PTRFLAGS_LBUTTON | (down ? PTRFLAGS_DOWN : 0));
42 return (PTRFLAGS_RBUTTON | (down ? PTRFLAGS_DOWN : 0));
45 public static int getMoveEvent()
50 public static int getScrollEvent(Context context,
boolean down)
52 int flags = PTRFLAGS_WHEEL;
59 flags |= (PTRFLAGS_WHEEL_NEGATIVE | 0x0088);