Commit a411517f authored by Alexander Gramiak's avatar Alexander Gramiak

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.
parent da9541dd
...@@ -6289,7 +6289,7 @@ mark_frame (struct Lisp_Vector *ptr) ...@@ -6289,7 +6289,7 @@ mark_frame (struct Lisp_Vector *ptr)
mark_vectorlike (&ptr->header); mark_vectorlike (&ptr->header);
mark_face_cache (f->face_cache); mark_face_cache (f->face_cache);
#ifdef HAVE_WINDOW_SYSTEM #ifdef HAVE_WINDOW_SYSTEM
if (FRAME_WINDOW_P (f) && FRAME_X_OUTPUT (f)) if (FRAME_WINDOW_P (f) && FRAME_OUTPUT_DATA (f))
{ {
struct font *font = FRAME_FONT (f); struct font *font = FRAME_FONT (f);
......
...@@ -1680,7 +1680,7 @@ struct face ...@@ -1680,7 +1680,7 @@ struct face
/* True means that colors of this face may not be freed because they /* True means that colors of this face may not be freed because they
have been copied bitwise from a base face (see have been copied bitwise from a base face (see
realize_x_face). */ realize_gui_face). */
bool_bf colors_copied_bitwise_p : 1; bool_bf colors_copied_bitwise_p : 1;
/* If non-zero, use overstrike (to simulate bold-face). */ /* If non-zero, use overstrike (to simulate bold-face). */
...@@ -2897,6 +2897,11 @@ struct redisplay_interface ...@@ -2897,6 +2897,11 @@ struct redisplay_interface
void (*clear_frame_area) (struct frame *f, int x, int y, void (*clear_frame_area) (struct frame *f, int x, int y,
int width, int height); int width, int height);
/* Clear area of frame F's internal border. If the internal border
face of F has been specified (is not null), fill the area with
that face. */
void (*clear_under_internal_border) (struct frame *f);
/* Draw specified cursor CURSOR_TYPE of width CURSOR_WIDTH /* Draw specified cursor CURSOR_TYPE of width CURSOR_WIDTH
at row GLYPH_ROW on window W if ON_P is true. If ON_P is at row GLYPH_ROW on window W if ON_P is true. If ON_P is
false, don't draw cursor. If ACTIVE_P is true, system caret false, don't draw cursor. If ACTIVE_P is true, system caret
...@@ -3347,20 +3352,22 @@ extern bool buffer_flipping_blocked_p (void); ...@@ -3347,20 +3352,22 @@ extern bool buffer_flipping_blocked_p (void);
#ifdef HAVE_WINDOW_SYSTEM #ifdef HAVE_WINDOW_SYSTEM
extern ptrdiff_t x_bitmap_pixmap (struct frame *, ptrdiff_t); extern ptrdiff_t image_bitmap_pixmap (struct frame *, ptrdiff_t);
extern void x_reference_bitmap (struct frame *, ptrdiff_t); extern void image_reference_bitmap (struct frame *, ptrdiff_t);
extern ptrdiff_t x_create_bitmap_from_data (struct frame *, char *, extern ptrdiff_t image_create_bitmap_from_data (struct frame *, char *,
unsigned int, unsigned int); unsigned int, unsigned int);
extern ptrdiff_t x_create_bitmap_from_file (struct frame *, Lisp_Object); extern ptrdiff_t image_create_bitmap_from_file (struct frame *, Lisp_Object);
#if defined HAVE_XPM && defined HAVE_X_WINDOWS && !defined USE_GTK #if defined HAVE_XPM && defined HAVE_X_WINDOWS && !defined USE_GTK
extern ptrdiff_t x_create_bitmap_from_xpm_data (struct frame *, const char **); extern ptrdiff_t x_create_bitmap_from_xpm_data (struct frame *, const char **);
#endif #endif
#ifndef x_destroy_bitmap #ifndef image_destroy_bitmap
extern void x_destroy_bitmap (struct frame *, ptrdiff_t); extern void image_destroy_bitmap (struct frame *, ptrdiff_t);
#endif #endif
extern void x_destroy_all_bitmaps (Display_Info *); extern void image_destroy_all_bitmaps (Display_Info *);
#ifdef HAVE_X_WINDOWS
extern void x_create_bitmap_mask (struct frame *, ptrdiff_t); extern void x_create_bitmap_mask (struct frame *, ptrdiff_t);
extern Lisp_Object x_find_image_file (Lisp_Object); #endif
extern Lisp_Object image_find_image_file (Lisp_Object);
void x_kill_gs_process (Pixmap, struct frame *); void x_kill_gs_process (Pixmap, struct frame *);
struct image_cache *make_image_cache (void); struct image_cache *make_image_cache (void);
...@@ -3446,11 +3453,6 @@ void gamma_correct (struct frame *, COLORREF *); ...@@ -3446,11 +3453,6 @@ void gamma_correct (struct frame *, COLORREF *);
#ifdef HAVE_WINDOW_SYSTEM #ifdef HAVE_WINDOW_SYSTEM
void x_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object);
void x_change_tool_bar_height (struct frame *f, int);
extern frame_parm_handler x_frame_parm_handlers[];
extern void start_hourglass (void); extern void start_hourglass (void);
extern void cancel_hourglass (void); extern void cancel_hourglass (void);
...@@ -3586,23 +3588,21 @@ enum resource_types ...@@ -3586,23 +3588,21 @@ enum resource_types
}; };
extern Display_Info *check_x_display_info (Lisp_Object); extern Display_Info *check_x_display_info (Lisp_Object);
extern Lisp_Object x_get_arg (Display_Info *, Lisp_Object, extern Lisp_Object gui_display_get_arg (Display_Info *, Lisp_Object,
Lisp_Object, const char *, const char *class, Lisp_Object, const char *, const char *,
enum resource_types);
extern Lisp_Object x_frame_get_and_record_arg (struct frame *, Lisp_Object,
Lisp_Object,
const char *, const char *,
enum resource_types);
extern Lisp_Object x_default_parameter (struct frame *, Lisp_Object,
Lisp_Object, Lisp_Object,
const char *, const char *,
enum resource_types); enum resource_types);
extern char *x_get_string_resource (XrmDatabase, const char *, extern Lisp_Object gui_frame_get_and_record_arg (struct frame *, Lisp_Object,
const char *); Lisp_Object,
const char *, const char *,
enum resource_types);
extern Lisp_Object gui_default_parameter (struct frame *, Lisp_Object,
Lisp_Object, Lisp_Object,
const char *, const char *,
enum resource_types);
#ifndef HAVE_NS /* These both used on W32 and X only. */ #ifndef HAVE_NS /* These both used on W32 and X only. */
extern bool x_mouse_grabbed (Display_Info *); extern bool gui_mouse_grabbed (Display_Info *);
extern void x_redo_mouse_highlight (Display_Info *); extern void gui_redo_mouse_highlight (Display_Info *);
#endif /* HAVE_NS */ #endif /* HAVE_NS */
#endif /* HAVE_WINDOW_SYSTEM */ #endif /* HAVE_WINDOW_SYSTEM */
......
...@@ -5551,7 +5551,7 @@ change_frame_size_1 (struct frame *f, int new_width, int new_height, ...@@ -5551,7 +5551,7 @@ change_frame_size_1 (struct frame *f, int new_width, int new_height,
* FRAME_LINE_HEIGHT (f)); * FRAME_LINE_HEIGHT (f));
} }
/* Adjust frame size but make sure x_set_window_size does not /* Adjust frame size but make sure set_window_size_hook does not
get called. */ get called. */
adjust_frame_size (f, new_width, new_height, 5, pretend, adjust_frame_size (f, new_width, new_height, 5, pretend,
Qchange_frame_size); Qchange_frame_size);
......
...@@ -1061,7 +1061,7 @@ font_for_char (struct face *face, int c, ptrdiff_t pos, Lisp_Object object) ...@@ -1061,7 +1061,7 @@ font_for_char (struct face *face, int c, ptrdiff_t pos, Lisp_Object object)
/* Make a realized fontset for ASCII face FACE on frame F from the /* Make a realized fontset for ASCII face FACE on frame F from the
base fontset BASE_FONTSET_ID. If BASE_FONTSET_ID is -1, use the base fontset BASE_FONTSET_ID. If BASE_FONTSET_ID is -1, use the
default fontset as the base. Value is the id of the new fontset. default fontset as the base. Value is the id of the new fontset.
Called from realize_x_face. */ Called from realize_gui_face. */
int int
make_fontset_for_ascii_face (struct frame *f, int base_fontset_id, struct face *face) make_fontset_for_ascii_face (struct frame *f, int base_fontset_id, struct face *face)
...@@ -1743,13 +1743,14 @@ static Lisp_Object auto_fontset_alist; ...@@ -1743,13 +1743,14 @@ static Lisp_Object auto_fontset_alist;
static ptrdiff_t num_auto_fontsets; static ptrdiff_t num_auto_fontsets;
/* Return a fontset synthesized from FONT-OBJECT. This is called from /* Return a fontset synthesized from FONT-OBJECT. This is called from
x_new_font when FONT-OBJECT is used for the default ASCII font of a the terminal hook set_new_font_hook when FONT-OBJECT is used for
frame, and the returned fontset is used for the default fontset of the default ASCII font of a frame, and the returned fontset is used
that frame. The fontset specifies a font of the same registry as for the default fontset of that frame. The fontset specifies a
FONT-OBJECT for all characters in the repertory of the registry font of the same registry as FONT-OBJECT for all characters in the
(see Vfont_encoding_alist). If the repertory is not known, the repertory of the registry (see Vfont_encoding_alist). If the
fontset specifies the font for all Latin characters assuming that a repertory is not known, the fontset specifies the font for all
user intends to use FONT-OBJECT for Latin characters. */ Latin characters assuming that a user intends to use FONT-OBJECT
for Latin characters. */
int int
fontset_from_font (Lisp_Object font_object) fontset_from_font (Lisp_Object font_object)
......
This diff is collapsed.
...@@ -397,9 +397,9 @@ struct frame ...@@ -397,9 +397,9 @@ struct frame
in pixels. */ in pixels. */
bool_bf new_pixelwise : 1; bool_bf new_pixelwise : 1;
/* True means x_set_window_size requests can be processed for this /* True means set_window_size_hook requests can be processed for
frame. */ this frame. */
bool_bf can_x_set_window_size : 1; bool_bf can_set_window_size : 1;
/* Set to true after this frame was made by `make-frame'. */ /* Set to true after this frame was made by `make-frame'. */
bool_bf after_make_frame : 1; bool_bf after_make_frame : 1;
...@@ -786,8 +786,8 @@ default_pixels_per_inch_y (void) ...@@ -786,8 +786,8 @@ default_pixels_per_inch_y (void)
#define FRAME_NS_P(f) ((f)->output_method == output_ns) #define FRAME_NS_P(f) ((f)->output_method == output_ns)
#endif #endif
/* FRAME_WINDOW_P tests whether the frame is a window, and is /* FRAME_WINDOW_P tests whether the frame is a graphical window system
defined to be the predicate for the window system being used. */ frame. */
#ifdef HAVE_X_WINDOWS #ifdef HAVE_X_WINDOWS
#define FRAME_WINDOW_P(f) FRAME_X_P (f) #define FRAME_WINDOW_P(f) FRAME_X_P (f)
...@@ -1544,59 +1544,44 @@ FRAME_BOTTOM_DIVIDER_WIDTH (struct frame *f) ...@@ -1544,59 +1544,44 @@ FRAME_BOTTOM_DIVIDER_WIDTH (struct frame *f)
/* The class of this X application. */ /* The class of this X application. */
#define EMACS_CLASS "Emacs" #define EMACS_CLASS "Emacs"
extern void x_set_scroll_bar_default_width (struct frame *); extern void gui_set_frame_parameters (struct frame *, Lisp_Object);
extern void x_set_scroll_bar_default_height (struct frame *); extern void gui_set_fullscreen (struct frame *, Lisp_Object, Lisp_Object);
extern void x_set_offset (struct frame *, int, int, int); extern void gui_set_line_spacing (struct frame *, Lisp_Object, Lisp_Object);
extern void x_wm_set_size_hint (struct frame *f, long flags, bool user_position); extern void gui_set_screen_gamma (struct frame *, Lisp_Object, Lisp_Object);
extern Lisp_Object x_new_font (struct frame *, Lisp_Object, int); extern void gui_set_font (struct frame *, Lisp_Object, Lisp_Object);
extern void x_set_frame_parameters (struct frame *, Lisp_Object); extern void gui_set_font_backend (struct frame *, Lisp_Object, Lisp_Object);
extern void x_set_fullscreen (struct frame *, Lisp_Object, Lisp_Object); extern void gui_set_left_fringe (struct frame *, Lisp_Object, Lisp_Object);
extern void x_set_line_spacing (struct frame *, Lisp_Object, Lisp_Object); extern void gui_set_right_fringe (struct frame *, Lisp_Object, Lisp_Object);
extern void x_set_screen_gamma (struct frame *, Lisp_Object, Lisp_Object); extern void gui_set_border_width (struct frame *, Lisp_Object, Lisp_Object);
extern void x_set_font (struct frame *, Lisp_Object, Lisp_Object); extern void gui_set_right_divider_width (struct frame *, Lisp_Object,
extern void x_set_font_backend (struct frame *, Lisp_Object, Lisp_Object); Lisp_Object);
extern void x_set_left_fringe (struct frame *, Lisp_Object, Lisp_Object); extern void gui_set_bottom_divider_width (struct frame *, Lisp_Object,
extern void x_set_right_fringe (struct frame *, Lisp_Object, Lisp_Object); Lisp_Object);
extern void x_set_border_width (struct frame *, Lisp_Object, Lisp_Object); extern void gui_set_visibility (struct frame *, Lisp_Object, Lisp_Object);
extern void x_set_right_divider_width (struct frame *, Lisp_Object, extern void gui_set_autoraise (struct frame *, Lisp_Object, Lisp_Object);
Lisp_Object); extern void gui_set_autolower (struct frame *, Lisp_Object, Lisp_Object);
extern void x_set_bottom_divider_width (struct frame *, Lisp_Object, extern void gui_set_unsplittable (struct frame *, Lisp_Object, Lisp_Object);
Lisp_Object); extern void gui_set_vertical_scroll_bars (struct frame *, Lisp_Object, Lisp_Object);
extern void x_set_visibility (struct frame *, Lisp_Object, Lisp_Object); extern void gui_set_horizontal_scroll_bars (struct frame *, Lisp_Object, Lisp_Object);
extern void x_set_autoraise (struct frame *, Lisp_Object, Lisp_Object); extern void gui_set_scroll_bar_width (struct frame *, Lisp_Object, Lisp_Object);
extern void x_set_autolower (struct frame *, Lisp_Object, Lisp_Object); extern void gui_set_scroll_bar_height (struct frame *, Lisp_Object, Lisp_Object);
extern void x_set_unsplittable (struct frame *, Lisp_Object, Lisp_Object);
extern void x_set_vertical_scroll_bars (struct frame *, Lisp_Object, Lisp_Object); extern long gui_figure_window_size (struct frame *, Lisp_Object, bool, int *, int *);
extern void x_set_horizontal_scroll_bars (struct frame *, Lisp_Object, Lisp_Object);
extern void x_set_scroll_bar_width (struct frame *, Lisp_Object, Lisp_Object); extern void gui_set_alpha (struct frame *, Lisp_Object, Lisp_Object);
extern void x_set_scroll_bar_height (struct frame *, Lisp_Object, Lisp_Object); extern void gui_set_no_special_glyphs (struct frame *, Lisp_Object, Lisp_Object);
extern long x_figure_window_size (struct frame *, Lisp_Object, bool, int *, int *);
extern void x_set_alpha (struct frame *, Lisp_Object, Lisp_Object);
extern void x_set_no_special_glyphs (struct frame *, Lisp_Object, Lisp_Object);
extern void validate_x_resource_name (void); extern void validate_x_resource_name (void);
extern Lisp_Object display_x_get_resource (Display_Info *, extern Lisp_Object gui_display_get_resource (Display_Info *,
Lisp_Object attribute, Lisp_Object attribute,
Lisp_Object class, Lisp_Object class,
Lisp_Object component, Lisp_Object component,
Lisp_Object subclass); Lisp_Object subclass);
extern void set_frame_menubar (struct frame *f, bool first_time, bool deep_p); extern void set_frame_menubar (struct frame *f, bool first_time, bool deep_p);
extern void x_set_window_size (struct frame *f, bool change_gravity,
int width, int height, bool pixelwise);
extern Lisp_Object x_get_focus_frame (struct frame *);
extern void frame_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y); extern void frame_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y);
extern void x_make_frame_visible (struct frame *f);
extern void x_make_frame_invisible (struct frame *f);
extern void x_iconify_frame (struct frame *f);
extern void x_set_frame_alpha (struct frame *f);
extern void x_activate_menubar (struct frame *);
extern void x_real_positions (struct frame *, int *, int *);
extern void free_frame_menubar (struct frame *); extern void free_frame_menubar (struct frame *);
extern void x_free_frame_resources (struct frame *);
extern bool frame_ancestor_p (struct frame *af, struct frame *df); extern bool frame_ancestor_p (struct frame *af, struct frame *df);
extern enum internal_border_part frame_internal_border_part (struct frame *f, int x, int y); extern enum internal_border_part frame_internal_border_part (struct frame *f, int x, int y);
...@@ -1608,22 +1593,17 @@ extern char *x_get_resource_string (const char *, const char *); ...@@ -1608,22 +1593,17 @@ extern char *x_get_resource_string (const char *, const char *);
extern void x_sync (struct frame *); extern void x_sync (struct frame *);
#endif /* HAVE_X_WINDOWS */ #endif /* HAVE_X_WINDOWS */
extern void x_query_colors (struct frame *f, XColor *, int);
extern void x_focus_frame (struct frame *, bool);
#ifndef HAVE_NS #ifndef HAVE_NS
extern bool x_bitmap_icon (struct frame *, Lisp_Object);
/* Set F's bitmap icon, if specified among F's parameters. */ /* Set F's bitmap icon, if specified among F's parameters. */
INLINE void INLINE void
x_set_bitmap_icon (struct frame *f) gui_set_bitmap_icon (struct frame *f)
{ {
Lisp_Object obj = assq_no_quit (Qicon_type, f->param_alist); Lisp_Object obj = assq_no_quit (Qicon_type, f->param_alist);
if (CONSP (obj) && !NILP (XCDR (obj))) if (CONSP (obj) && !NILP (XCDR (obj)))
x_bitmap_icon (f, XCDR (obj)); FRAME_TERMINAL (f)->set_bitmap_icon_hook (f, XCDR (obj));
} }
#endif /* !HAVE_NS */ #endif /* !HAVE_NS */
......
...@@ -328,7 +328,7 @@ xg_get_image_for_pixmap (struct frame *f, ...@@ -328,7 +328,7 @@ xg_get_image_for_pixmap (struct frame *f,
In that case, use the pixmap already loaded. */ In that case, use the pixmap already loaded. */
if (STRINGP (specified_file) if (STRINGP (specified_file)
&& STRINGP (file = x_find_image_file (specified_file))) && STRINGP (file = image_find_image_file (specified_file)))
{ {
char *encoded_file = SSDATA (ENCODE_FILE (file)); char *encoded_file = SSDATA (ENCODE_FILE (file));
if (! old_widget) if (! old_widget)
...@@ -866,7 +866,7 @@ xg_frame_resized (struct frame *f, int pixelwidth, int pixelheight) ...@@ -866,7 +866,7 @@ xg_frame_resized (struct frame *f, int pixelwidth, int pixelheight)
|| pixelwidth != FRAME_PIXEL_WIDTH (f) || pixelwidth != FRAME_PIXEL_WIDTH (f)
|| pixelheight != FRAME_PIXEL_HEIGHT (f)) || pixelheight != FRAME_PIXEL_HEIGHT (f))
{ {
x_clear_under_internal_border (f); FRAME_RIF (f)->clear_under_internal_border (f);
change_frame_size (f, width, height, 0, 1, 0, 1); change_frame_size (f, width, height, 0, 1, 0, 1);
SET_FRAME_GARBAGED (f); SET_FRAME_GARBAGED (f);
cancel_mouse_face (f); cancel_mouse_face (f);
...@@ -894,7 +894,7 @@ xg_frame_set_char_size (struct frame *f, int width, int height) ...@@ -894,7 +894,7 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
&gwidth, &gheight); &gwidth, &gheight);
/* Do this before resize, as we don't know yet if we will be resized. */ /* Do this before resize, as we don't know yet if we will be resized. */
x_clear_under_internal_border (f); FRAME_RIF (f)->clear_under_internal_border (f);
totalheight /= xg_get_scale (f); totalheight /= xg_get_scale (f);
totalwidth /= xg_get_scale (f); totalwidth /= xg_get_scale (f);
...@@ -960,7 +960,7 @@ xg_frame_set_char_size (struct frame *f, int width, int height) ...@@ -960,7 +960,7 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
/* Try to restore fullscreen state. */ /* Try to restore fullscreen state. */
{ {
store_frame_param (f, Qfullscreen, fullscreen); store_frame_param (f, Qfullscreen, fullscreen);
x_set_fullscreen (f, fullscreen, fullscreen); gui_set_fullscreen (f, fullscreen, fullscreen);
} }
} }
else else
...@@ -1078,8 +1078,8 @@ style_changed_cb (GObject *go, ...@@ -1078,8 +1078,8 @@ style_changed_cb (GObject *go,
&& FRAME_X_P (f) && FRAME_X_P (f)
&& FRAME_X_DISPLAY (f) == dpy) && FRAME_X_DISPLAY (f) == dpy)
{ {
x_set_scroll_bar_default_width (f); FRAME_TERMINAL (f)->set_scroll_bar_default_width_hook (f);
x_set_scroll_bar_default_height (f); FRAME_TERMINAL (f)->set_scroll_bar_default_height_hook (f);
xg_frame_set_char_size (f, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f)); xg_frame_set_char_size (f, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f));
} }
} }
...@@ -4324,7 +4324,7 @@ xg_tool_bar_callback (GtkWidget *w, gpointer client_data) ...@@ -4324,7 +4324,7 @@ xg_tool_bar_callback (GtkWidget *w, gpointer client_data)
/* Return focus to the frame after we have clicked on a detached /* Return focus to the frame after we have clicked on a detached
tool bar button. */ tool bar button. */
x_focus_frame (f, false); FRAME_TERMINAL (f)->focus_frame_hook (f, false);
} }
static GtkWidget * static GtkWidget *
......
This diff is collapsed.
...@@ -3890,10 +3890,12 @@ kbd_buffer_get_event (KBOARD **kbp, ...@@ -3890,10 +3890,12 @@ kbd_buffer_get_event (KBOARD **kbp,
#ifdef HAVE_EXT_MENU_BAR #ifdef HAVE_EXT_MENU_BAR
case MENU_BAR_ACTIVATE_EVENT: case MENU_BAR_ACTIVATE_EVENT:
{ {
struct frame *f;
kbd_fetch_ptr = next_kbd_event (event); kbd_fetch_ptr = next_kbd_event (event);
input_pending = readable_events (0); input_pending = readable_events (0);
if (FRAME_LIVE_P (XFRAME (event->ie.frame_or_window))) f = (XFRAME (event->ie.frame_or_window));
x_activate_menubar (XFRAME (event->ie.frame_or_window)); if (FRAME_LIVE_P (f) && FRAME_TERMINAL (f)->activate_menubar_hook)
FRAME_TERMINAL (f)->activate_menubar_hook (f);
} }
break; break;
#endif #endif
...@@ -6508,7 +6510,7 @@ modify_event_symbol (ptrdiff_t symbol_num, int modifiers, Lisp_Object symbol_kin ...@@ -6508,7 +6510,7 @@ modify_event_symbol (ptrdiff_t symbol_num, int modifiers, Lisp_Object symbol_kin
#ifdef HAVE_WINDOW_SYSTEM #ifdef HAVE_WINDOW_SYSTEM
if (NILP (value)) if (NILP (value))
{ {
char *name = x_get_keysym_name (symbol_num); char *name = get_keysym_name (symbol_num);
if (name) if (name)
value = intern (name); value = intern (name);
} }
......
...@@ -4647,7 +4647,7 @@ extern void syms_of_xterm (void); ...@@ -4647,7 +4647,7 @@ extern void syms_of_xterm (void);
#ifdef HAVE_WINDOW_SYSTEM #ifdef HAVE_WINDOW_SYSTEM
/* Defined in xterm.c, nsterm.m, w32term.c. */ /* Defined in xterm.c, nsterm.m, w32term.c. */
extern char *x_get_keysym_name (int); extern char *get_keysym_name (int);
#endif /* HAVE_WINDOW_SYSTEM */ #endif /* HAVE_WINDOW_SYSTEM */
/* Defined in xml.c. */ /* Defined in xml.c. */
......
...@@ -47,14 +47,17 @@ extern widget_value *digest_single_submenu (int, int, bool); ...@@ -47,14 +47,17 @@ extern widget_value *digest_single_submenu (int, int, bool);
#if defined (HAVE_X_WINDOWS) || defined (MSDOS) #if defined (HAVE_X_WINDOWS) || defined (MSDOS)
extern Lisp_Object x_menu_show (struct frame *, int, int, int, extern Lisp_Object x_menu_show (struct frame *, int, int, int,
Lisp_Object, const char **); Lisp_Object, const char **);
extern void x_activate_menubar (struct frame *);
#endif #endif
#ifdef HAVE_NTGUI #ifdef HAVE_NTGUI
extern Lisp_Object w32_menu_show (struct frame *, int, int, int, extern Lisp_Object w32_menu_show (struct frame *, int, int, int,
Lisp_Object, const char **); Lisp_Object, const char **);
extern void w32_activate_menubar (struct frame *);
#endif #endif
#ifdef HAVE_NS #ifdef HAVE_NS
extern Lisp_Object ns_menu_show (struct frame *, int, int, int, extern Lisp_Object ns_menu_show (struct frame *, int, int, int,
Lisp_Object, const char **); Lisp_Object, const char **);
extern void ns_activate_menubar (struct frame *);
#endif #endif
extern Lisp_Object tty_menu_show (struct frame *, int, int, int, extern Lisp_Object tty_menu_show (struct frame *, int, int, int,
Lisp_Object, const char **); Lisp_Object, const char **);
......
This diff is collapsed.
...@@ -117,9 +117,6 @@ typedef void * Color; ...@@ -117,9 +117,6 @@ typedef void * Color;
typedef int Window; typedef int Window;
typedef int Display; typedef int Display;
/* Xism */
typedef Lisp_Object XrmDatabase;
/* Some sort of attempt to normalize rectangle handling. Seems a bit /* Some sort of attempt to normalize rectangle handling. Seems a bit
much for what is accomplished. */ much for what is accomplished. */
......
...@@ -193,7 +193,7 @@ + (instancetype)allocInitFromFile: (Lisp_Object)file ...@@ -193,7 +193,7 @@ + (instancetype)allocInitFromFile: (Lisp_Object)file
EmacsImage *image; EmacsImage *image;
/* Search bitmap-file-path for the file, if appropriate. */ /* Search bitmap-file-path for the file, if appropriate. */
found = x_find_image_file (file); found = image_find_image_file (file);
if (!STRINGP (found)) if (!STRINGP (found))
return nil; return nil;
found = ENCODE_FILE (found); found = ENCODE_FILE (found);
......
...@@ -470,7 +470,7 @@ ...@@ -470,7 +470,7 @@
} }
void void
x_activate_menubar (struct frame *f) ns_activate_menubar (struct frame *f)
{ {
#ifdef NS_IMPL_COCOA #ifdef NS_IMPL_COCOA
ns_update_menubar (f, true, nil); ns_update_menubar (f, true, nil);
......
...@@ -869,7 +869,7 @@ struct ns_display_info ...@@ -869,7 +869,7 @@ struct ns_display_info
Window root_window; Window root_window;
/* Xism */ /* Xism */
XrmDatabase xrdb; Lisp_Object rdb;
/* The cursor to use for vertical scroll bars. */ /* The cursor to use for vertical scroll bars. */
Cursor vertical_scroll_bar_cursor; Cursor vertical_scroll_bar_cursor;
...@@ -882,7 +882,7 @@ struct ns_display_info ...@@ -882,7 +882,7 @@ struct ns_display_info
Mouse_HLInfo mouse_highlight; Mouse_HLInfo mouse_highlight;
struct frame *x_highlight_frame; struct frame *x_highlight_frame;
struct frame *x_focus_frame; struct frame *ns_focus_frame;
/* The frame where the mouse was last time we reported a mouse event. */ /* The frame where the mouse was last time we reported a mouse event. */
struct frame *last_mouse_frame; struct frame *last_mouse_frame;
...@@ -993,9 +993,9 @@ struct x_output ...@@ -993,9 +993,9 @@ struct x_output
/* This gives the ns_display_info structure for the display F is on. */ /* This gives the ns_display_info structure for the display F is on. */
#define FRAME_DISPLAY_INFO(f) ((f)->output_data.ns->display_info) #define FRAME_DISPLAY_INFO(f) ((f)->output_data.ns->display_info)
#define FRAME_X_OUTPUT(f) ((f)->output_data.ns) #define FRAME_OUTPUT_DATA(f) ((f)->output_data.ns)
#define FRAME_NS_WINDOW(f) ((f)->output_data.ns->window_desc) #define FRAME_NS_WINDOW(f) ((f)->output_data.ns->window_desc)
#define FRAME_X_WINDOW(f) ((f)->output_data.ns->window_desc) #define FRAME_NATIVE_WINDOW(f) FRAME_NS_WINDOW (f)
/* This is the `Display *' which frame F is on. */ /* This is the `Display *' which frame F is on. */
#define FRAME_NS_DISPLAY(f) (0) #define FRAME_NS_DISPLAY(f) (0)
...@@ -1122,6 +1122,9 @@ extern Lisp_Object ns_list_fonts (struct frame *f, Lisp_Object pattern, ...@@ -1122,6 +1122,9 @@ extern Lisp_Object ns_list_fonts (struct frame *f, Lisp_Object pattern,
int size, int maxnames); int size, int maxnames);
extern void ns_clear_frame (struct frame *f); extern void ns_clear_frame (struct frame *f);
extern void ns_set_offset (struct frame *f, int xoff, int yoff,
int change_grav);
extern const char *ns_xlfd_to_fontname (const char *xlfd); extern const char *ns_xlfd_to_fontname (const char *xlfd);
extern Lisp_Object ns_map_event_to_object (void); extern Lisp_Object ns_map_event_to_object (void);
...@@ -1140,7 +1143,7 @@ ns_defined_color (struct frame *f, ...@@ -1140,7 +1143,7 @@ ns_defined_color (struct frame *f,
XColor *color_def, bool alloc, XColor *color_def, bool alloc,
bool makeIndex); bool makeIndex);
extern void extern void
ns_query_color (void *col, XColor *color_def, int setPixel); ns_query_color (void *col, XColor *color_def, bool setPixel);
#ifdef __OBJC__ #ifdef __OBJC__
extern int ns_lisp_to_color (Lisp_Object color, NSColor **col); extern int ns_lisp_to_color (Lisp_Object color, NSColor **col);
...@@ -1151,6 +1154,15 @@ extern void ns_check_menu_open (NSMenu *menu); ...@@ -1151,6 +1154,15 @@ extern void ns_check_menu_open (NSMenu *menu);
extern void ns_check_pending_open_menu (void); extern void ns_check_pending_open_menu (void);
#endif #endif
/* Implemented in nsfns, published in nsterm. */
extern void ns_implicitly_set_name (struct frame *f, Lisp_Object arg,
Lisp_Object oldval);
extern void ns_set_scroll_bar_default_width (struct frame *f);
extern void ns_set_scroll_bar_default_height (struct frame *f);
extern const char *ns_get_string_resource (void *_rdb,
const char *name,
const char *class);
/* C access to ObjC functionality */ /* C access to ObjC functionality */
extern void ns_release_object (void *obj); extern void ns_release_object (void *obj);
extern void ns_retain_object (void *obj); extern void ns_retain_object (void *obj);
...@@ -1172,6 +1184,8 @@ extern Lisp_Object find_and_return_menu_selection (struct frame *f, ...@@ -1172,6 +1184,8 @@ extern Lisp_Object find_and_return_menu_selection (struct frame *f,
extern Lisp_Object ns_popup_dialog (struct frame *, Lisp_Object header, extern Lisp_Object ns_popup_dialog (struct frame *, Lisp_Object header,
Lisp_Object contents); Lisp_Object contents);
extern void ns_free_frame_resources (struct frame *);
#define NSAPP_DATA2_RUNASSCRIPT 10 #define NSAPP_DATA2_RUNASSCRIPT 10
extern void ns_run_ascript (void); extern void ns_run_ascript (void);
...@@ -1201,22 +1215,23 @@ extern unsigned long ns_get_pixel (void *img, int x, int y); ...@@ -1201,22 +1215,23 @@ extern unsigned long ns_get_pixel (void *img, int x, int y);
extern void ns_put_pixel (void *img, int x, int y, unsigned long argb); extern void ns_put_pixel (void *img, int x, int y, unsigned long argb);
extern void ns_set_alpha (void *img, int x, int y, unsigned char a); extern void ns_set_alpha (void *img, int x, int y, unsigned char a);
extern int x_display_pixel_height (struct ns_display_info *); extern int ns_display_pixel_height (struct ns_display_info *);
extern int x_display_pixel_width (struct ns_display_info *); extern int ns_display_pixel_width (struct ns_display_info *);
/* This in nsterm.m */ /* This in nsterm.m */
extern float ns_antialias_threshold; extern float ns_antialias_threshold;
extern void x_destroy_window (struct frame *f); extern void ns_make_frame_visible (struct frame *f);
extern void x_set_undecorated (struct frame *f, Lisp_Object new_value, extern void ns_iconify_frame (struct frame *f);
Lisp_Object old_value); extern void ns_set_undecorated (struct frame *f, Lisp_Object new_value,
extern void x_set_parent_frame (struct frame *f, Lisp_Object new_value,
Lisp_Object old_value); Lisp_Object old_value);
extern void x_set_no_focus_on_map (struct frame *f, Lisp_Object new_value, extern void ns_set_parent_frame (struct frame *f, Lisp_Object new_value,
Lisp_Object old_value); Lisp_Object old_value);
extern void x_set_no_accept_focus (struct frame *f, Lisp_Object new_value, extern void ns_set_no_focus_on_map (struct frame *f, Lisp_Object new_value,
Lisp_Object old_value); Lisp_Object old_value);
extern void x_set_z_group (struct frame *f, Lisp_Object new_value, extern void ns_set_no_accept_focus (struct frame *f, Lisp_Object new_value,
Lisp_Object old_value); Lisp_Object old_value);
extern void ns_set_z_group (struct frame *f, Lisp_Object new_value,
Lisp_Object old_value);
#ifdef NS_IMPL_COCOA #ifdef NS_IMPL_COCOA
extern void ns_set_appearance (struct frame *f, Lisp_Object new_value, extern void ns_set_appearance (struct frame *f, Lisp_Object new_value,
Lisp_Object old_value); Lisp_Object old_value);
......
This diff is collapsed.
...@@ -490,6 +490,23 @@ struct terminal ...@@ -490,6 +490,23 @@ struct terminal
/* Multi-frame and mouse support hooks. */ /* 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