summaryrefslogtreecommitdiff
path: root/src/frame.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/frame.h')
-rw-r--r--src/frame.h103
1 files changed, 91 insertions, 12 deletions
diff --git a/src/frame.h b/src/frame.h
index b95b94c7685..e2900d1c15b 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -76,6 +76,64 @@ enum ns_appearance_type
#endif
#endif /* HAVE_WINDOW_SYSTEM */
+#ifdef HAVE_TEXT_CONVERSION
+
+enum text_conversion_operation
+ {
+ TEXTCONV_START_BATCH_EDIT,
+ TEXTCONV_END_BATCH_EDIT,
+ TEXTCONV_COMMIT_TEXT,
+ TEXTCONV_FINISH_COMPOSING_TEXT,
+ TEXTCONV_SET_COMPOSING_TEXT,
+ TEXTCONV_SET_COMPOSING_REGION,
+ TEXTCONV_SET_POINT_AND_MARK,
+ TEXTCONV_DELETE_SURROUNDING_TEXT,
+ TEXTCONV_REQUEST_POINT_UPDATE,
+ };
+
+/* Structure describing a single edit being performed by the input
+ method that should be executed in the context of
+ kbd_buffer_get_event. */
+
+struct text_conversion_action
+{
+ /* The next text conversion action. */
+ struct text_conversion_action *next;
+
+ /* Any associated data. */
+ Lisp_Object data;
+
+ /* The operation being performed. */
+ enum text_conversion_operation operation;
+
+ /* Counter value. */
+ unsigned long counter;
+};
+
+/* Structure describing the text conversion state associated with a
+ frame. */
+
+struct text_conversion_state
+{
+ /* List of text conversion actions associated with this frame. */
+ struct text_conversion_action *actions;
+
+ /* Markers representing the composing region. */
+ Lisp_Object compose_region_start, compose_region_end;
+
+ /* Overlay representing the composing region. */
+ Lisp_Object compose_region_overlay;
+
+ /* The number of ongoing ``batch edits'' that are causing point
+ reporting to be delayed. */
+ int batch_edit_count;
+
+ /* Mask containing what must be updated after batch edits end. */
+ int batch_edit_flags;
+};
+
+#endif
+
/* The structure representing a frame. */
struct frame
@@ -181,7 +239,7 @@ struct frame
most recently buried buffer is first. For last-buffer. */
Lisp_Object buried_buffer_list;
-#if defined (HAVE_X_WINDOWS) && ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK)
+#if defined HAVE_WINDOW_SYSTEM && !defined HAVE_EXT_MENU_BAR
/* A dummy window used to display menu bars under X when no X
toolkit support is available. */
Lisp_Object menu_bar_window;
@@ -377,7 +435,7 @@ struct frame
/* The output method says how the contents of this frame are
displayed. It could be using termcap, or using an X window.
This must be the same as the terminal->type. */
- ENUM_BF (output_method) output_method : 3;
+ ENUM_BF (output_method) output_method : 4;
#ifdef HAVE_WINDOW_SYSTEM
/* True if this frame is a tooltip frame. */
@@ -586,20 +644,22 @@ struct frame
well. */
union output_data
{
- struct tty_output *tty; /* From termchar.h. */
- struct x_output *x; /* From xterm.h. */
- struct w32_output *w32; /* From w32term.h. */
- struct ns_output *ns; /* From nsterm.h. */
- struct pgtk_output *pgtk; /* From pgtkterm.h. */
- struct haiku_output *haiku; /* From haikuterm.h. */
+ struct tty_output *tty; /* From termchar.h. */
+ struct x_output *x; /* From xterm.h. */
+ struct w32_output *w32; /* From w32term.h. */
+ struct ns_output *ns; /* From nsterm.h. */
+ struct pgtk_output *pgtk; /* From pgtkterm.h. */
+ struct haiku_output *haiku; /* From haikuterm.h. */
+ struct android_output *android; /* From androidterm.h. */
}
output_data;
/* List of font-drivers available on the frame. */
struct font_driver_list *font_driver_list;
-#if defined (HAVE_X_WINDOWS)
- /* Used by x_wait_for_event when watching for an X event on this frame. */
+#if defined HAVE_X_WINDOWS || defined HAVE_ANDROID
+ /* Used by x_wait_for_event when watching for an X event on this
+ frame. */
int wait_event_type;
#endif
@@ -662,6 +722,11 @@ struct frame
enum ns_appearance_type ns_appearance;
bool_bf ns_transparent_titlebar;
#endif
+
+#ifdef HAVE_TEXT_CONVERSION
+ /* Text conversion state used by certain input methods. */
+ struct text_conversion_state conversion;
+#endif
} GCALIGNED_STRUCT;
/* Most code should use these functions to set Lisp fields in struct frame. */
@@ -713,7 +778,7 @@ fset_menu_bar_vector (struct frame *f, Lisp_Object val)
{
f->menu_bar_vector = val;
}
-#if defined (HAVE_X_WINDOWS) && ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK)
+#if defined HAVE_WINDOW_SYSTEM && !defined HAVE_EXT_MENU_BAR
INLINE void
fset_menu_bar_window (struct frame *f, Lisp_Object val)
{
@@ -872,6 +937,11 @@ default_pixels_per_inch_y (void)
#else
#define FRAME_HAIKU_P(f) ((f)->output_method == output_haiku)
#endif
+#ifndef HAVE_ANDROID
+#define FRAME_ANDROID_P(f) false
+#else
+#define FRAME_ANDROID_P(f) ((f)->output_method == output_android)
+#endif
/* FRAME_WINDOW_P tests whether the frame is a graphical window system
frame. */
@@ -890,6 +960,9 @@ default_pixels_per_inch_y (void)
#ifdef HAVE_HAIKU
#define FRAME_WINDOW_P(f) FRAME_HAIKU_P (f)
#endif
+#ifdef HAVE_ANDROID
+#define FRAME_WINDOW_P(f) FRAME_ANDROID_P (f)
+#endif
#ifndef FRAME_WINDOW_P
#define FRAME_WINDOW_P(f) ((void) (f), false)
#endif
@@ -917,11 +990,17 @@ default_pixels_per_inch_y (void)
frame F. We need to define two versions because a TTY-only build
does not have FRAME_DISPLAY_INFO. */
#ifdef HAVE_WINDOW_SYSTEM
+#ifndef HAVE_ANDROID
# define MOUSE_HL_INFO(F) \
- (FRAME_WINDOW_P(F) \
+ (FRAME_WINDOW_P (F) \
? &FRAME_DISPLAY_INFO(F)->mouse_highlight \
: &(F)->output_data.tty->display_info->mouse_highlight)
#else
+/* There is no "struct tty_output" on Android at all. */
+# define MOUSE_HL_INFO(F) \
+ (&FRAME_DISPLAY_INFO(F)->mouse_highlight)
+#endif
+#else
# define MOUSE_HL_INFO(F) \
(&(F)->output_data.tty->display_info->mouse_highlight)
#endif