summaryrefslogtreecommitdiff
path: root/src/termhooks.h
diff options
context:
space:
mode:
authorAlexander Gramiak <agrambot@gmail.com>2019-04-13 09:40:03 -0600
committerAlexander Gramiak <agrambot@gmail.com>2019-04-26 16:54:17 -0600
commita411517faf624657aa58979f5463115115093309 (patch)
treebd75804dd99876f424c9e6805212e356683c54d4 /src/termhooks.h
parentda9541dd1086b7bab52940c82915efe114bb7419 (diff)
downloademacs-a411517faf624657aa58979f5463115115093309.tar.gz
Rename generic x_* identifiers
* src/image.c: Rename x_* procedures to image_*. * src/frame.c: Rename x_* procedures to gui_*. Rename xrdb_get_resource to gui_display_get_resource. Rename x_get_arg to gui_display_get arg. * src/frame.h: Rename can_x_set_window_size to can_set_window_size. * src/xfaces.c: Rename realize_x_face to realize_gui_face. Rename x_supports_face_attributes_p to gui_supports_face_attributes_p. * src/keyboard.c: * src/lisp.h: * src/nsterm.m: * src/w32term.c: * src/xterm.c: Rename x_get_keysym_name to get_keysym_name. * src/nsfns.c: * src/nsterm.m: Rename x_* procedures to ns_*. * src/w32fns.c: * src/w32term.c: Rename x_* procedures to w32_*. * src/termhooks.h (query_colors, get_focus_frame, focus_frame_hook) (frame_visible_invisible_hook, iconify_frame_hook) (set_window_size_hook, set_frame_offset_hook, set_frame_alpha_hook) (set_new_font_hook, set_bitmap_icon_hook, implicit_set_name_hook) (activate_menubar_hook, change_tool_bar_height_hook) (set_scroll_bar_default_width_hook) (set_scroll_bar_default_height_hook, get_string_resource_hook): New terminal hooks to replace backend-specific x_* procedures. * src/dispextern.h (clear_under_internal_border): New RIF procedure. * src/alloc.c: * src/frame.c: * src/xdisp.c: Use FRAME_OUTPUT_DATA instead of FRAME_X_OUTPUT. * src/frame.c: * src/w32term.c: * src/w32fns.c: Use FRAME_NATIVE_WINDOW instead of FRAME_X_WINDOW.
Diffstat (limited to 'src/termhooks.h')
-rw-r--r--src/termhooks.h79
1 files changed, 79 insertions, 0 deletions
diff --git a/src/termhooks.h b/src/termhooks.h
index a92b981110d..b66233cf1c5 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -490,6 +490,23 @@ struct terminal
/* Multi-frame and mouse support hooks. */
+ /* Graphical window systems are expected to define all of the
+ following hooks with the possible exception of:
+
+ * query_colors
+ * activate_menubar_hook
+ * change_tool_bar_height_hook
+ * set_bitmap_icon_hook
+ * buffer_flipping_unblocked_hook
+
+ */
+
+#if defined (HAVE_X_WINDOWS) || defined (HAVE_NTGUI)
+ /* On frame F, translate pixel colors to RGB values for the NCOLORS
+ colors in COLORS. Use cached information, if available. */
+
+ void (*query_colors) (struct frame *f, XColor *colors, int ncolors);
+#endif
/* Return the current position of the mouse.
Set *f to the frame the mouse is in, or zero if the mouse is in no
@@ -512,6 +529,12 @@ struct terminal
Lisp_Object *y,
Time *);
+ /* This hook is called to get the focus frame. */
+ Lisp_Object (*get_focus_frame) (struct frame *f);
+
+ /* This hook is called to shift frame focus. */
+ void (*focus_frame_hook) (struct frame *f, bool noactivate);
+
/* When a frame's focus redirection is changed, this hook tells the
window system code to re-decide where to put the highlight. Under
X, this means that Emacs lies about where the focus is. */
@@ -529,19 +552,65 @@ struct terminal
windows. */
void (*frame_raise_lower_hook) (struct frame *f, bool raise_flag);
+ /* This hook is called to make the frame F visible if VISIBLE is
+ true, or invisible otherwise. */
+ void (*frame_visible_invisible_hook) (struct frame *f, bool visible);
+
/* If the value of the frame parameter changed, this hook is called.
For example, if going from fullscreen to not fullscreen this hook
may do something OS dependent, like extended window manager hints on X11. */
void (*fullscreen_hook) (struct frame *f);
+ /* This hook is called to iconify the frame. */
+ void (*iconify_frame_hook) (struct frame *f);
+
+ /* This hook is called to change the size of frame F's native
+ (underlying) window. If CHANGE_GRAVITY, change to top-left-corner
+ window gravity for this size change and subsequent size changes.
+ Otherwise we leave the window gravity unchanged. */
+ void (*set_window_size_hook) (struct frame *f, bool change_gravity,
+ int width, int height, bool pixelwise);
+
+ /* CHANGE_GRAVITY is 1 when calling from Fset_frame_position,
+ to really change the position, and 0 when calling from
+ *_make_frame_visible (in that case, XOFF and YOFF are the current
+ position values). It is -1 when calling from gui_set_frame_parameters,
+ which means, do adjust for borders but don't change the gravity. */
+
+ void (*set_frame_offset_hook) (struct frame *f, register int xoff,
+ register int yoff, int change_gravity);
+
+ /* This hook is called to set the frame's transparency. */
+ void (*set_frame_alpha_hook) (struct frame *f);
+
+ /* This hook is called to set a new font for the frame. */
+ Lisp_Object (*set_new_font_hook) (struct frame *f, Lisp_Object font_object,
+ int fontset);
+
+ /* This hook is called to set the GUI window icon of F using FILE. */
+ bool (*set_bitmap_icon_hook) (struct frame *f, Lisp_Object file);
+
+ /* This hook is called to set the name of the GUI window of F by
+ redisplay unless another name was explicitly requested. */
+ void (*implicit_set_name_hook) (struct frame *f, Lisp_Object arg,
+ Lisp_Object oldval);
+
/* This hook is called to display menus. */
Lisp_Object (*menu_show_hook) (struct frame *f, int x, int y, int menuflags,
Lisp_Object title, const char **error_name);
+#ifdef HAVE_EXT_MENU_BAR
+ /* This hook is called to activate the menu bar. */
+ void (*activate_menubar_hook) (struct frame *f);
+#endif
+
/* This hook is called to display popup dialog. */
Lisp_Object (*popup_dialog_hook) (struct frame *f, Lisp_Object header,
Lisp_Object contents);
+ /* This hook is called to change the frame's (internal) tool-bar. */
+ void (*change_tool_bar_height_hook) (struct frame *f, int height);
+
/* Scroll bar hooks. */
/* The representation of scroll bars is determined by the code which
@@ -583,6 +652,11 @@ struct terminal
int portion, int whole,
int position);
+ /* Set the default scroll bar width on FRAME. */
+ void (*set_scroll_bar_default_width_hook) (struct frame *frame);
+
+ /* Set the default scroll bar height on FRAME. */
+ void (*set_scroll_bar_default_height_hook) (struct frame *frame);
/* The following three hooks are used when we're doing a thorough
redisplay of the frame. We don't explicitly know which scroll bars
@@ -645,6 +719,11 @@ struct terminal
while it runs. */
void (*buffer_flipping_unblocked_hook) (struct frame *);
+ /* Retrieve the string resource specified by NAME with CLASS from
+ database RDB. */
+ const char * (*get_string_resource_hook) (void *rdb,
+ const char *name,
+ const char *class);
/* Called to delete the device-specific portions of a frame that is
on this terminal device. */