(define-key special-event-map [preedit-text] 'android-preedit-text)
+\f
+;; Android cursor shapes, named according to the X scheme.
+;; Many X cursors are missing.
+
+(defconst x-pointer-arrow 1000)
+(defconst x-pointer-left-ptr 1000)
+(defconst x-pointer-left-side 1020)
+(defconst x-pointer-sb-h-double-arrow 1014)
+(defconst x-pointer-sb-v-double-arrow 1015)
+(defconst x-pointer-watch 1004)
+(defconst x-pointer-xterm 1008)
+(defconst x-pointer-invisible 0)
+
+\f
(provide 'android-win)
;; android-win.el ends here.
android_clear_window (FRAME_ANDROID_DRAWABLE (f));
}
+static void
+android_show_hourglass (struct frame *f)
+{
+ struct android_output *x;
+
+ /* This isn't implemented like X because a window brings alongside
+ too many unneeded resources. */
+
+ x = FRAME_ANDROID_OUTPUT (f);
+
+ /* If the hourglass window is mapped inside a popup menu, input
+ could be lost if the menu is popped down and the grab is
+ relinquished, but the hourglass window is still up. Just
+ avoid displaying the hourglass at all while popups are
+ active. */
+
+ if (popup_activated ())
+ return;
+
+ x->hourglass = true;
+
+ if (!f->pointer_invisible)
+ android_define_cursor (FRAME_ANDROID_WINDOW (f),
+ x->hourglass_cursor);
+}
+
+static void
+android_hide_hourglass (struct frame *f)
+{
+ struct android_output *x;
+
+ x = FRAME_ANDROID_OUTPUT (f);
+ x->hourglass = false;
+
+ if (!f->pointer_invisible)
+ android_define_cursor (FRAME_ANDROID_WINDOW (f),
+ x->current_cursor);
+}
+
static void
android_flash (struct frame *f)
{
dpyinfo->invisible_cursor);
else
android_define_cursor (FRAME_ANDROID_WINDOW (f),
- f->output_data.android->current_cursor);
+ (FRAME_ANDROID_OUTPUT (f)->hourglass
+ ? f->output_data.android->hourglass_cursor
+ : f->output_data.android->current_cursor));
f->pointer_invisible = invisible;
}
android_define_frame_cursor (struct frame *f, Emacs_Cursor cursor)
{
if (!f->pointer_invisible
+ && !FRAME_ANDROID_OUTPUT (f)->hourglass
&& f->output_data.android->current_cursor != cursor)
android_define_cursor (FRAME_ANDROID_WINDOW (f), cursor);
android_draw_vertical_window_border,
android_draw_window_divider,
NULL,
- NULL,
- NULL,
+ android_show_hourglass,
+ android_hide_hourglass,
android_default_font_parameter,
#endif
};