|
| | SessionInputManager (Context context, ScrollView2D scrollView, SessionView sessionView, TouchPointerView touchPointerView, ExtendedKeyboardView keyboard) |
| |
| void | attachSession (long instance, Bitmap surface) |
| |
| void | setBitmap (Bitmap bitmap) |
| |
| ScaleGestureDetector.OnScaleGestureListener | getPinchZoomListener () |
| |
| void | setScreenSize (int width, int height) |
| |
| void | toggleKeyboard () |
| |
| void | hideKeyboards () |
| |
| boolean | handleKeyboardBack () |
| |
| boolean | isSoftInputActive () |
| |
| void | onImeVisibilityChanged (boolean visible) |
| |
| void | cancelPendingEvents () |
| |
| boolean | onGenericMotionEvent (MotionEvent e) |
| |
| boolean | onAndroidKeyEvent (KeyEvent event) |
| |
| boolean | onAndroidKeyLongPress (int keyCode) |
| |
| boolean | handleBackAsAltF4 () |
| |
| void | toggleTouchPointer () |
| |
| void | onSessionViewBeginTouch () |
| |
| void | onSessionViewEndTouch () |
| |
| void | onSessionViewLeftTouch (int x, int y, boolean down) |
| |
| void | onSessionViewMiddleTouch (int x, int y, boolean down) |
| |
| void | onSessionViewRightTouch (int x, int y, boolean down) |
| |
| void | onSessionViewMove (int x, int y) |
| |
| void | onSessionViewMouseMove (int x, int y) |
| |
| void | onSessionViewScroll (boolean down) |
| |
| void | onSessionViewHScroll (boolean right) |
| |
| void | onTouchPointerClose () |
| |
| void | onTouchPointerLeftClick (int x, int y, boolean down) |
| |
| void | onTouchPointerRightClick (int x, int y, boolean down) |
| |
| void | onTouchPointerMove (int x, int y) |
| |
| void | onTouchPointerMoveEnd () |
| |
| void | onTouchPointerScroll (boolean down) |
| |
| void | onTouchPointerToggleKeyboard () |
| |
| void | onTouchPointerResetScrollZoom () |
| |
| void | processVirtualKey (int virtualKeyCode, boolean down) |
| |
| void | processUnicodeKey (int unicodeKey) |
| |
| void | switchKeyboard (int keyboardType) |
| |
| void | modifiersChanged () |
| |
| void | onKey (int keycode) |
| |
| void | onKeyLock (int keycode) |
| |
| int | getModifierState (int keycode) |
| |
| void | onExpandedChanged (boolean expanded) |
| |
Definition at line 30 of file SessionInputManager.java.
◆ SessionInputManager()
Definition at line 66 of file SessionInputManager.java.
68 {
69 this.context = context;
70 this.scrollView = scrollView;
71 this.sessionView = sessionView;
72 this.touchPointerView = touchPointerView;
73 this.keyboard = keyboard;
74 this.handler = new InputHandler();
75
76 this.keyboardMapper = new KeyboardMapper();
77 this.keyboardMapper.init(context);
78
79 keyboard.setListener(this);
80 }
◆ attachSession()
| void com.freerdp.freerdpcore.presentation.SessionInputManager.attachSession |
( |
long |
instance, |
|
|
Bitmap |
surface |
|
) |
| |
|
inline |
Definition at line 83 of file SessionInputManager.java.
84 {
85 this.instance = instance;
86 this.bitmap = surface;
87 keyboardMapper.reset(this);
88 }
◆ cancelPendingEvents()
| void com.freerdp.freerdpcore.presentation.SessionInputManager.cancelPendingEvents |
( |
| ) |
|
|
inline |
◆ getModifierState()
| int com.freerdp.freerdpcore.presentation.SessionInputManager.getModifierState |
( |
int |
keycode | ) |
|
|
inline |
◆ getPinchZoomListener()
| ScaleGestureDetector.OnScaleGestureListener com.freerdp.freerdpcore.presentation.SessionInputManager.getPinchZoomListener |
( |
| ) |
|
|
inline |
◆ handleBackAsAltF4()
| boolean com.freerdp.freerdpcore.presentation.SessionInputManager.handleBackAsAltF4 |
( |
| ) |
|
|
inline |
Definition at line 244 of file SessionInputManager.java.
245 {
246 if (instance == 0)
247 return false;
248 if (!ApplicationSettingsActivity.getUseBackAsAltf4(context))
249 return false;
250 keyboardMapper.sendAltF4();
251 return true;
252 }
◆ handleKeyboardBack()
| boolean com.freerdp.freerdpcore.presentation.SessionInputManager.handleKeyboardBack |
( |
| ) |
|
|
inline |
Definition at line 136 of file SessionInputManager.java.
137 {
138 if (keyboard.getVisibility() != View.VISIBLE)
139 return false;
140
141 if (keyboard.isExpanded())
142 {
143 keyboard.setExpanded(false, false);
144
145 refreshSystemBars();
146 scrollView.requestApplyInsets();
147 return true;
148 }
149
150 hideKeyboards();
151 return true;
152 }
◆ hideKeyboards()
| void com.freerdp.freerdpcore.presentation.SessionInputManager.hideKeyboards |
( |
| ) |
|
|
inline |
Definition at line 125 of file SessionInputManager.java.
126 {
127 keyboard.setExpanded(false, false);
128 keyboard.setVisibility(View.GONE);
129 setSoftInputState(false);
130 keyboardMapper.clearlAllModifiers();
131
132 scrollView.post(this::refreshSystemBars);
133 }
◆ isSoftInputActive()
| boolean com.freerdp.freerdpcore.presentation.SessionInputManager.isSoftInputActive |
( |
| ) |
|
|
inline |
Definition at line 155 of file SessionInputManager.java.
156 {
157 return keyboard.getVisibility() == View.VISIBLE && (softInputRequested || softInputVisible);
158 }
◆ modifiersChanged()
| void com.freerdp.freerdpcore.presentation.SessionInputManager.modifiersChanged |
( |
| ) |
|
|
inline |
◆ onAndroidKeyEvent()
| boolean com.freerdp.freerdpcore.presentation.SessionInputManager.onAndroidKeyEvent |
( |
KeyEvent |
event | ) |
|
|
inline |
Definition at line 222 of file SessionInputManager.java.
223 {
224 if (instance == 0)
225 return false;
226 return keyboardMapper.processAndroidKeyEvent(event);
227 }
◆ onAndroidKeyLongPress()
| boolean com.freerdp.freerdpcore.presentation.SessionInputManager.onAndroidKeyLongPress |
( |
int |
keyCode | ) |
|
|
inline |
Definition at line 231 of file SessionInputManager.java.
232 {
233 if (instance == 0)
234 return false;
235 if (keyCode == KeyEvent.KEYCODE_BACK)
236 {
237 LibFreeRDP.disconnect(instance);
238 return true;
239 }
240 return false;
241 }
◆ onExpandedChanged()
| void com.freerdp.freerdpcore.presentation.SessionInputManager.onExpandedChanged |
( |
boolean |
expanded | ) |
|
|
inline |
◆ onGenericMotionEvent()
| boolean com.freerdp.freerdpcore.presentation.SessionInputManager.onGenericMotionEvent |
( |
MotionEvent |
e | ) |
|
|
inline |
Definition at line 206 of file SessionInputManager.java.
207 {
208 if (instance == 0)
209 return false;
210 if (e.getAction() != MotionEvent.ACTION_SCROLL)
211 return false;
212
213 final float vScroll = e.getAxisValue(MotionEvent.AXIS_VSCROLL);
214 if (vScroll < 0)
215 LibFreeRDP.sendCursorEvent(instance, 0, 0, Mouse.getScrollEvent(context, false));
216 else if (vScroll > 0)
217 LibFreeRDP.sendCursorEvent(instance, 0, 0, Mouse.getScrollEvent(context, true));
218 return true;
219 }
◆ onImeVisibilityChanged()
| void com.freerdp.freerdpcore.presentation.SessionInputManager.onImeVisibilityChanged |
( |
boolean |
visible | ) |
|
|
inline |
Definition at line 162 of file SessionInputManager.java.
163 {
164 if (visible == softInputVisible)
165 return;
166 softInputVisible = visible;
167 if (!visible)
168 softInputRequested = false;
169 refreshSystemBars();
170 }
◆ onKey()
| void com.freerdp.freerdpcore.presentation.SessionInputManager.onKey |
( |
int |
keycode | ) |
|
|
inline |
◆ onKeyLock()
| void com.freerdp.freerdpcore.presentation.SessionInputManager.onKeyLock |
( |
int |
keycode | ) |
|
|
inline |
◆ onSessionViewBeginTouch()
| void com.freerdp.freerdpcore.presentation.SessionInputManager.onSessionViewBeginTouch |
( |
| ) |
|
|
inline |
◆ onSessionViewEndTouch()
| void com.freerdp.freerdpcore.presentation.SessionInputManager.onSessionViewEndTouch |
( |
| ) |
|
|
inline |
◆ onSessionViewHScroll()
| void com.freerdp.freerdpcore.presentation.SessionInputManager.onSessionViewHScroll |
( |
boolean |
right | ) |
|
|
inline |
◆ onSessionViewLeftTouch()
| void com.freerdp.freerdpcore.presentation.SessionInputManager.onSessionViewLeftTouch |
( |
int |
x, |
|
|
int |
y, |
|
|
boolean |
down |
|
) |
| |
|
inline |
◆ onSessionViewMiddleTouch()
| void com.freerdp.freerdpcore.presentation.SessionInputManager.onSessionViewMiddleTouch |
( |
int |
x, |
|
|
int |
y, |
|
|
boolean |
down |
|
) |
| |
|
inline |
◆ onSessionViewMouseMove()
| void com.freerdp.freerdpcore.presentation.SessionInputManager.onSessionViewMouseMove |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
|
inline |
◆ onSessionViewMove()
| void com.freerdp.freerdpcore.presentation.SessionInputManager.onSessionViewMove |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
|
inline |
◆ onSessionViewRightTouch()
| void com.freerdp.freerdpcore.presentation.SessionInputManager.onSessionViewRightTouch |
( |
int |
x, |
|
|
int |
y, |
|
|
boolean |
down |
|
) |
| |
|
inline |
◆ onSessionViewScroll()
| void com.freerdp.freerdpcore.presentation.SessionInputManager.onSessionViewScroll |
( |
boolean |
down | ) |
|
|
inline |
◆ onTouchPointerClose()
| void com.freerdp.freerdpcore.presentation.SessionInputManager.onTouchPointerClose |
( |
| ) |
|
|
inline |
◆ onTouchPointerLeftClick()
| void com.freerdp.freerdpcore.presentation.SessionInputManager.onTouchPointerLeftClick |
( |
int |
x, |
|
|
int |
y, |
|
|
boolean |
down |
|
) |
| |
|
inline |
◆ onTouchPointerMove()
| void com.freerdp.freerdpcore.presentation.SessionInputManager.onTouchPointerMove |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
|
inline |
Implements com.freerdp.freerdpcore.presentation.TouchPointerView.TouchPointerListener.
Definition at line 405 of file SessionInputManager.java.
406 {
407 if (instance == 0)
408 return;
409 Point p = mapScreenCoordToSessionCoord(x, y);
410 LibFreeRDP.sendCursorEvent(instance, p.x, p.y, Mouse.getMoveEvent());
411
412 if (ApplicationSettingsActivity.getAutoScrollTouchPointer(context) &&
413 !handler.hasMessages(MSG_SCROLLING_REQUESTED))
414 {
415 handler.sendEmptyMessageDelayed(MSG_SCROLLING_REQUESTED, SCROLLING_TIMEOUT);
416 }
417 }
◆ onTouchPointerMoveEnd()
| void com.freerdp.freerdpcore.presentation.SessionInputManager.onTouchPointerMoveEnd |
( |
| ) |
|
|
inline |
◆ onTouchPointerResetScrollZoom()
| void com.freerdp.freerdpcore.presentation.SessionInputManager.onTouchPointerResetScrollZoom |
( |
| ) |
|
|
inline |
◆ onTouchPointerRightClick()
| void com.freerdp.freerdpcore.presentation.SessionInputManager.onTouchPointerRightClick |
( |
int |
x, |
|
|
int |
y, |
|
|
boolean |
down |
|
) |
| |
|
inline |
◆ onTouchPointerScroll()
| void com.freerdp.freerdpcore.presentation.SessionInputManager.onTouchPointerScroll |
( |
boolean |
down | ) |
|
|
inline |
◆ onTouchPointerToggleKeyboard()
| void com.freerdp.freerdpcore.presentation.SessionInputManager.onTouchPointerToggleKeyboard |
( |
| ) |
|
|
inline |
◆ processUnicodeKey()
| void com.freerdp.freerdpcore.presentation.SessionInputManager.processUnicodeKey |
( |
int |
unicodeKey | ) |
|
|
inline |
Definition at line 452 of file SessionInputManager.java.
453 {
454 if (instance == 0)
455 return;
456 if (LibFreeRDP.isUnicodeInputSupported(instance))
457 {
458 LibFreeRDP.sendUnicodeKeyEvent(instance, unicodeKey, true);
459 LibFreeRDP.sendUnicodeKeyEvent(instance, unicodeKey, false);
460 }
461 else
462 keyboardMapper.processUnicodeFallback(unicodeKey);
463 }
◆ processVirtualKey()
| void com.freerdp.freerdpcore.presentation.SessionInputManager.processVirtualKey |
( |
int |
virtualKeyCode, |
|
|
boolean |
down |
|
) |
| |
|
inline |
Definition at line 445 of file SessionInputManager.java.
446 {
447 if (instance == 0)
448 return;
449 LibFreeRDP.sendKeyEvent(instance, virtualKeyCode, down);
450 }
◆ setBitmap()
| void com.freerdp.freerdpcore.presentation.SessionInputManager.setBitmap |
( |
Bitmap |
bitmap | ) |
|
|
inline |
◆ setScreenSize()
| void com.freerdp.freerdpcore.presentation.SessionInputManager.setScreenSize |
( |
int |
width, |
|
|
int |
height |
|
) |
| |
|
inline |
◆ switchKeyboard()
| void com.freerdp.freerdpcore.presentation.SessionInputManager.switchKeyboard |
( |
int |
keyboardType | ) |
|
|
inline |
Definition at line 465 of file SessionInputManager.java.
466 {
467 switch (keyboardType)
468 {
469 case KeyboardMapper.KEYBOARD_TYPE_FUNCTIONKEYS:
470 keyboard.selectPage(ExtendedKeyboardView.PAGE_SPECIAL);
471 break;
472
473 case KeyboardMapper.KEYBOARD_TYPE_NUMPAD:
474 keyboard.selectPage(ExtendedKeyboardView.PAGE_NUM);
475 break;
476
477 default:
478 break;
479 }
480 }
◆ toggleKeyboard()
| void com.freerdp.freerdpcore.presentation.SessionInputManager.toggleKeyboard |
( |
| ) |
|
|
inline |
Definition at line 110 of file SessionInputManager.java.
111 {
112 if (keyboard.getVisibility() == View.VISIBLE)
113 {
114 hideKeyboards();
115 }
116 else
117 {
118 keyboard.setExpanded(false, false);
119 keyboard.setVisibility(View.VISIBLE);
120 setSoftInputState(true);
121 }
122 }
◆ toggleTouchPointer()
| void com.freerdp.freerdpcore.presentation.SessionInputManager.toggleTouchPointer |
( |
| ) |
|
|
inline |
Definition at line 255 of file SessionInputManager.java.
256 {
257 if (touchPointerView.getVisibility() == View.VISIBLE)
258 {
259 touchPointerView.setVisibility(View.INVISIBLE);
260 sessionView.setTouchPointerPadding(0, 0);
261 }
262 else
263 {
264 touchPointerView.setVisibility(View.VISIBLE);
265 sessionView.setTouchPointerPadding(touchPointerView.getPointerWidth(),
266 touchPointerView.getPointerHeight());
267 }
268 }
The documentation for this class was generated from the following file: