temp, };
}
- /* Display the specified STRING in a small dialog box on the main
- thread. */
-
- public void
- displayToast (final String string)
- {
- runOnUiThread (new Runnable () {
- @Override
- public void
- run ()
- {
- Toast toast;
-
- toast = Toast.makeText (getApplicationContext (),
- string, Toast.LENGTH_SHORT);
- toast.show ();
- }
- });
- }
-
public void
updateExtractedText (EmacsWindow window, ExtractedText text,
int token)
;; This file provides code to recognize simple touch screen gestures.
;; It is used on X and Android, where the platform cannot recognize
;; them for us.
+;;
+;; See (elisp)Touchscreen Events for a description of the details of touch
+;; events.
;;; Code:
(posn (cdr point)) window point)
(cond ((null what)
(when (windowp (posn-window posn))
- (setq point (posn-point point)
+ (setq point (posn-point posn)
window (posn-window posn))
;; Select the window that was tapped.
(select-window window)
where WINDOW specifies a window to scroll, and DX and DY are
integers describing how many pixels to be scrolled horizontally
-and vertically.
+and vertically,
+
+ (touchscreen-hold POSN)
+ (touchscreen-drag POSN)
+
+where POSN is the position of the long-press or touchpoint
+motion,
(down-mouse-1 POSN)
(drag-mouse-1 POSN)
-where POSN is the position of the mouse button press or click.
+where POSN is the position of the mouse button press or click,
(mouse-1 POSN)
(mouse-2 POSN)
(define-key function-key-map [mode-line touchscreen-end]
#'touch-screen-translate-touch)
+;; These are used to translate events sent from the internal border
+;; or from outside the frame.
+
+(define-key function-key-map [nil touchscreen-begin]
+ #'touch-screen-translate-touch)
+(define-key function-key-map [nil touchscreen-update]
+ #'touch-screen-translate-touch)
+(define-key function-key-map [nil touchscreen-end]
+ #'touch-screen-translate-touch)
+
(define-key function-key-map [header-line touchscreen-begin]
#'touch-screen-translate-touch)
(define-key function-key-map [header-line touchscreen-update]
FIND_METHOD (check_content_uri, "checkContentUri",
"([BZZ)Z");
FIND_METHOD (query_battery, "queryBattery", "()[J");
- FIND_METHOD (display_toast, "displayToast",
- "(Ljava/lang/String;)V");
FIND_METHOD (update_extracted_text, "updateExtractedText",
"(Lorg/gnu/emacs/EmacsWindow;"
"Landroid/view/inputmethod/ExtractedText;I)V");