From: Yuuki Harano Date: Sun, 14 Nov 2021 11:27:31 +0000 (+0900) Subject: Fix coding style X-Git-Tag: emacs-29.0.90~3666 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=30a00f14c824e5e4005a1cb6ccf2f26def19d80b;p=emacs.git Fix coding style Especially, insert a space between function name and paren. * src/alloc.c (garbage_collect): * src/font.h: * src/frame.h: * src/fringe.c: * src/gtkutil.c (xg_set_screen): (xg_create_frame_widgets): (xg_create_frame_outer_widgets): (xg_get_file_name): (xg_get_font): (xg_update_scrollbar_pos): * src/image.c (image_create_bitmap_from_file): (xpm_load_image): * src/pgtkfns.c (pgtk_get_monitor_scale_factor): (is_wayland_display): (pgtk_display_info_for_name): (INSTALL_CURSOR): (Fx_create_frame): (Fx_display_mm_height): (Fx_display_mm_width): (Fx_display_pixel_width): (Fx_display_pixel_height): * src/pgtkselect.c (pgtk_selection_usable): (Fpgtk_own_selection_internal): (Fpgtk_get_selection_internal): * src/pgtkterm.c: (x_set_parent_frame): (pgtk_draw_fringe_bitmap): (pgtk_handle_draw): (scroll_event): (pgtk_text_scaling_factor): (pgtk_term_init): * src/pgtkterm.h: * src/window.h: * src/xdisp.c (redisplay_internal): (draw_glyphs_debug): (draw_glyphs): (note_mouse_highlight): --- diff --git a/src/alloc.c b/src/alloc.c index 9388cf1d08f..22e3e8e2a1b 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -6145,7 +6145,7 @@ garbage_collect (void) mark_kboards (); mark_threads (); #ifdef HAVE_PGTK - mark_pgtkterm(); + mark_pgtkterm (); #endif #ifdef USE_GTK diff --git a/src/font.h b/src/font.h index 6ee7bcafffa..a847f232f6d 100644 --- a/src/font.h +++ b/src/font.h @@ -822,7 +822,7 @@ extern Lisp_Object merge_font_spec (Lisp_Object, Lisp_Object); extern Lisp_Object font_make_entity (void); extern Lisp_Object font_make_object (int, Lisp_Object, int); -#if defined (HAVE_XFT) || defined (HAVE_FREETYPE) || defined (HAVE_NS) || defined(HAVE_PGTK) +#if defined (HAVE_XFT) || defined (HAVE_FREETYPE) || defined (HAVE_NS) || defined (HAVE_PGTK) extern Lisp_Object font_build_object (int, Lisp_Object, Lisp_Object, double); #endif diff --git a/src/frame.h b/src/frame.h index 39607766049..fa6cc4a5617 100644 --- a/src/frame.h +++ b/src/frame.h @@ -1684,7 +1684,7 @@ extern const char *x_get_resource_string (const char *, const char *); extern void x_sync (struct frame *); #endif /* HAVE_X_WINDOWS */ -#if !defined(HAVE_NS) && !defined(HAVE_PGTK) +#if !defined (HAVE_NS) && !defined (HAVE_PGTK) /* Set F's bitmap icon, if specified among F's parameters. */ diff --git a/src/fringe.c b/src/fringe.c index f22d0956982..441146d135d 100644 --- a/src/fringe.c +++ b/src/fringe.c @@ -1410,7 +1410,7 @@ If BITMAP overrides a standard fringe bitmap, the original bitmap is restored. On W32 and MAC (little endian), there's no need to do this. */ -#if defined (HAVE_X_WINDOWS) || defined(HAVE_PGTK) +#if defined (HAVE_X_WINDOWS) || defined (HAVE_PGTK) static const unsigned char swap_nibble[16] = { 0x0, 0x8, 0x4, 0xc, /* 0000 1000 0100 1100 */ 0x2, 0xa, 0x6, 0xe, /* 0010 1010 0110 1110 */ diff --git a/src/gtkutil.c b/src/gtkutil.c index 7f8a33c01d7..6822aeb4e32 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -151,9 +151,9 @@ xg_set_screen (GtkWidget *w, struct frame *f) gtk_window_set_screen (GTK_WINDOW (w), gscreen); } #else - if (FRAME_X_DISPLAY(f) != DEFAULT_GDK_DISPLAY ()) + if (FRAME_X_DISPLAY (f) != DEFAULT_GDK_DISPLAY ()) { - GdkScreen *gscreen = gdk_display_get_default_screen (FRAME_X_DISPLAY(f)); + GdkScreen *gscreen = gdk_display_get_default_screen (FRAME_X_DISPLAY (f)); if (GTK_IS_MENU (w)) gtk_menu_set_screen (GTK_MENU (w), gscreen); @@ -1425,7 +1425,7 @@ xg_create_frame_widgets (struct frame *f) type = GTK_WINDOW_POPUP; } wtop = gtk_window_new (type); - gtk_widget_add_events(wtop, GDK_ALL_EVENTS_MASK); + gtk_widget_add_events (wtop, GDK_ALL_EVENTS_MASK); #endif /* gtk_window_set_has_resize_grip is a Gtk+ 3.0 function but Ubuntu @@ -1626,7 +1626,7 @@ xg_create_frame_outer_widgets (struct frame *f) block_input (); wtop = gtk_window_new (type); - gtk_widget_add_events(wtop, GDK_ALL_EVENTS_MASK); + gtk_widget_add_events (wtop, GDK_ALL_EVENTS_MASK); xg_set_screen (wtop, f); @@ -2582,7 +2582,7 @@ xg_get_file_name (struct frame *f, #ifdef HAVE_PGTK if (!FRAME_GTK_OUTER_WIDGET (f)) - error("Can't open dialog from child frames"); + error ("Can't open dialog from child frames"); #endif #ifdef HAVE_GTK_FILE_SELECTION_NEW @@ -2684,7 +2684,7 @@ xg_get_font (struct frame *f, const char *default_name) #ifdef HAVE_PGTK if (!FRAME_GTK_OUTER_WIDGET (f)) - error("Can't open dialog from child frames"); + error ("Can't open dialog from child frames"); #endif w = gtk_font_chooser_dialog_new @@ -4437,7 +4437,7 @@ xg_update_scrollbar_pos (struct frame *f, /* Don't obscure any child frames. */ XLowerWindow (FRAME_X_DISPLAY (f), GTK_WIDGET_TO_X_WIN (webox)); #else - gdk_window_lower (gtk_widget_get_window(webox)); + gdk_window_lower (gtk_widget_get_window (webox)); #endif } diff --git a/src/image.c b/src/image.c index d03e16e5c8c..a41a2a16a64 100644 --- a/src/image.c +++ b/src/image.c @@ -585,15 +585,15 @@ image_create_bitmap_from_file (struct frame *f, Lisp_Object file) #ifdef HAVE_PGTK GError *err = NULL; ptrdiff_t id; - void * bitmap = gdk_pixbuf_new_from_file(SSDATA(file), &err); + void * bitmap = gdk_pixbuf_new_from_file (SSDATA (file), &err); if (!bitmap) { - g_error_free(err); + g_error_free (err); return -1; } - id = image_allocate_bitmap_record(f); + id = image_allocate_bitmap_record (f); dpyinfo->bitmaps[id - 1].img = bitmap; dpyinfo->bitmaps[id - 1].refcount = 1; @@ -5034,7 +5034,7 @@ xpm_load_image (struct frame *f, Lisp_Object (*get_color_table) (Lisp_Object, const char *, int); Lisp_Object frame, color_symbols, color_table; int best_key; -#if !defined(HAVE_NS) +#if !defined (HAVE_NS) bool have_mask = false; #endif Emacs_Pix_Container ximg = NULL, mask_img = NULL; diff --git a/src/pgtkfns.c b/src/pgtkfns.c index 0f9f2e4c83f..3c2ea02831a 100644 --- a/src/pgtkfns.c +++ b/src/pgtkfns.c @@ -70,7 +70,7 @@ pgtk_get_monitor_scale_factor (const char *model) return 0.0; Lisp_Object mdl = build_string (model); - Lisp_Object tem = Fassoc(mdl, monitor_scale_factor_alist, Qnil); + Lisp_Object tem = Fassoc (mdl, monitor_scale_factor_alist, Qnil); if (NILP (tem)) return 0; Lisp_Object cdr = Fcdr (tem); @@ -134,10 +134,10 @@ check_pgtk_display_info (Lisp_Object object) * display. */ static Lisp_Object -is_wayland_display(Lisp_Object dpyname) +is_wayland_display (Lisp_Object dpyname) { const char *p = SSDATA (dpyname); - if (strncmp(p, "wayland-", 8) != 0) + if (strncmp (p, "wayland-", 8) != 0) return Qnil; p += 8; do { @@ -156,7 +156,7 @@ pgtk_display_info_for_name (Lisp_Object name) CHECK_STRING (name); - if (!NILP (is_wayland_display(name))) + if (!NILP (is_wayland_display (name))) { for (dpyinfo = x_display_list; dpyinfo; dpyinfo = dpyinfo->next) if (!NILP (is_wayland_display (XCAR (dpyinfo->name_list_element)))) @@ -1615,7 +1615,7 @@ This function is an internal primitive--use `make-frame' instead. */ ) #define INSTALL_CURSOR(FIELD, NAME) \ - FRAME_X_OUTPUT(f)->FIELD = gdk_cursor_new_for_display(FRAME_X_DISPLAY(f), GDK_ ## NAME) + FRAME_X_OUTPUT (f)->FIELD = gdk_cursor_new_for_display (FRAME_X_DISPLAY (f), GDK_ ## NAME) INSTALL_CURSOR (text_cursor, XTERM); INSTALL_CURSOR (nontext_cursor, LEFT_PTR); @@ -1693,13 +1693,12 @@ This function is an internal primitive--use `make-frame' instead. */ ) unblock_input (); } - if (FRAME_GTK_OUTER_WIDGET (f)) { - GList *w = gtk_container_get_children(GTK_CONTAINER(FRAME_GTK_OUTER_WIDGET (f))); - for (; w != NULL; w = w->next) - { - gtk_widget_show_all (GTK_WIDGET(w->data)); - } - } + if (FRAME_GTK_OUTER_WIDGET (f)) + { + GList *w = gtk_container_get_children (GTK_CONTAINER (FRAME_GTK_OUTER_WIDGET (f))); + for (; w != NULL; w = w->next) + gtk_widget_show_all (GTK_WIDGET (w->data)); + } gui_default_parameter (f, parms, Qno_focus_on_map, Qnil, NULL, NULL, RES_TYPE_BOOLEAN); @@ -2204,7 +2203,7 @@ for each physical monitor, use `display-monitor-attributes-list'. */) int mm = gdk_monitor_get_height_mm (monitor); if (rec.y == 0) - height_mm_at_0 = max(height_mm_at_0, mm); + height_mm_at_0 = max (height_mm_at_0, mm); else height_mm_at_other += mm; } @@ -2245,7 +2244,7 @@ for each physical monitor, use `display-monitor-attributes-list'. */) int mm = gdk_monitor_get_width_mm (monitor); if (rec.x == 0) - width_mm_at_0 = max(width_mm_at_0, mm); + width_mm_at_0 = max (width_mm_at_0, mm); else width_mm_at_other += mm; } @@ -2572,7 +2571,7 @@ each physical monitor, use `display-monitor-attributes-list'. */) rec.width = rec.width * scale + 0.5; rec.height = rec.height * scale + 0.5; - width = max(width, rec.x + rec.width); + width = max (width, rec.x + rec.width); } unblock_input (); @@ -2618,7 +2617,7 @@ each physical monitor, use `display-monitor-attributes-list'. */) rec.width = rec.width * scale + 0.5; rec.height = rec.height * scale + 0.5; - height = max(height, rec.y + rec.height); + height = max (height, rec.y + rec.height); } unblock_input (); diff --git a/src/pgtkselect.c b/src/pgtkselect.c index 447c839f459..58a2b0d05e2 100644 --- a/src/pgtkselect.c +++ b/src/pgtkselect.c @@ -249,48 +249,48 @@ pgtk_selection_usable (void) * * static GtkWidget *top1, *top2; * - * int main(int argc, char **argv) + * int main (int argc, char **argv) * { * GtkWidget *w; * GtkTextBuffer *buf; * - * gtk_init(&argc, &argv); + * gtk_init (&argc, &argv); * * static char *text = "\ * It is fine today.\n\ * It will be fine tomorrow too.\n\ * It is too hot."; * - * top1 = gtk_window_new(GTK_WINDOW_TOPLEVEL); - * gtk_window_set_title(GTK_WINDOW(top1), "default"); - * gtk_widget_show(top1); - * w = gtk_text_view_new(); - * gtk_container_add(GTK_CONTAINER(top1), w); - * gtk_widget_show(w); - * buf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(w)); - * gtk_text_buffer_insert_at_cursor(buf, text, strlen(text)); - * gtk_text_buffer_add_selection_clipboard(buf, gtk_widget_get_clipboard(w, GDK_SELECTION_PRIMARY)); + * top1 = gtk_window_new (GTK_WINDOW_TOPLEVEL); + * gtk_window_set_title (GTK_WINDOW (top1), "default"); + * gtk_widget_show (top1); + * w = gtk_text_view_new (); + * gtk_container_add (GTK_CONTAINER (top1), w); + * gtk_widget_show (w); + * buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (w)); + * gtk_text_buffer_insert_at_cursor (buf, text, strlen (text)); + * gtk_text_buffer_add_selection_clipboard (buf, gtk_widget_get_clipboard (w, GDK_SELECTION_PRIMARY)); * - * unsetenv("GDK_BACKEND"); + * unsetenv ("GDK_BACKEND"); * GdkDisplay *gdpy; * const char *dpyname2; - * if (strcmp(G_OBJECT_TYPE_NAME(gtk_widget_get_window(top1)), "GdkWaylandWindow") == 0) + * if (strcmp (G_OBJECT_TYPE_NAME (gtk_widget_get_window (top1)), "GdkWaylandWindow") == 0) * dpyname2 = ":0"; * else * dpyname2 = "wayland-0"; * gdpy = gdk_display_open (dpyname2); * top2 = gtk_window_new (GTK_WINDOW_TOPLEVEL); - * gtk_window_set_title(GTK_WINDOW(top2), dpyname2); - * gtk_window_set_screen (GTK_WINDOW (top2), gdk_display_get_default_screen(gdpy)); + * gtk_window_set_title (GTK_WINDOW (top2), dpyname2); + * gtk_window_set_screen (GTK_WINDOW (top2), gdk_display_get_default_screen (gdpy)); * gtk_widget_show (top2); - * w = gtk_text_view_new(); - * gtk_container_add(GTK_CONTAINER(top2), w); - * gtk_widget_show(w); - * buf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(w)); - * gtk_text_buffer_insert_at_cursor(buf, text, strlen(text)); - * gtk_text_buffer_add_selection_clipboard(buf, gtk_widget_get_clipboard(w, GDK_SELECTION_PRIMARY)); + * w = gtk_text_view_new (); + * gtk_container_add (GTK_CONTAINER (top2), w); + * gtk_widget_show (w); + * buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (w)); + * gtk_text_buffer_insert_at_cursor (buf, text, strlen (text)); + * gtk_text_buffer_add_selection_clipboard (buf, gtk_widget_get_clipboard (w, GDK_SELECTION_PRIMARY)); * - * gtk_main(); + * gtk_main (); * * return 0; * } @@ -376,8 +376,8 @@ nil, it defaults to the selected frame. */) { /* text/plain: Strings encoded by Gtk are not correctly decoded by Chromium(Wayland). */ - GdkAtom atom_text_plain = gdk_atom_intern("text/plain", false); - gtk_target_list_remove(list, atom_text_plain); + GdkAtom atom_text_plain = gdk_atom_intern ("text/plain", false); + gtk_target_list_remove (list, atom_text_plain); } targets = gtk_target_table_new_from_list (list, &n_targets); @@ -575,11 +575,11 @@ On PGTK, TIME-STAMP is unused. */) property `foreign-selection' so that the caller of x-get-selection-internal (usually x-get-selection) can know that the string must be decode. */ - if (sd_type == gdk_atom_intern("COMPOUND_TEXT", false)) + if (sd_type == gdk_atom_intern ("COMPOUND_TEXT", false)) lispy_type = QCOMPOUND_TEXT; - else if (sd_type == gdk_atom_intern("UTF8_STRING", false)) + else if (sd_type == gdk_atom_intern ("UTF8_STRING", false)) lispy_type = QUTF8_STRING; - else if (sd_type == gdk_atom_intern("text/plain;charset=utf-8", false)) + else if (sd_type == gdk_atom_intern ("text/plain;charset=utf-8", false)) lispy_type = Qtext_plain_charset_utf_8; else lispy_type = QSTRING; diff --git a/src/pgtkterm.c b/src/pgtkterm.c index 40489c0c6b1..d81517a5d8e 100644 --- a/src/pgtkterm.c +++ b/src/pgtkterm.c @@ -67,7 +67,7 @@ along with GNU Emacs. If not, see . */ #define FRAME_CR_CONTEXT(f) ((f)->output_data.pgtk->cr_context) #define FRAME_CR_ACTIVE_CONTEXT(f) ((f)->output_data.pgtk->cr_active) -#define FRAME_CR_SURFACE(f) (cairo_get_target(FRAME_CR_CONTEXT(f))) +#define FRAME_CR_SURFACE(f) (cairo_get_target (FRAME_CR_CONTEXT (f))) #define FRAME_CR_SURFACE_DESIRED_WIDTH(f) \ ((f)->output_data.pgtk->cr_surface_desired_width) #define FRAME_CR_SURFACE_DESIRED_HEIGHT(f) \ @@ -829,7 +829,7 @@ x_set_parent_frame (struct frame *f, Lisp_Object new_value, GtkWidget *fixed = FRAME_GTK_WIDGET (f); GtkAllocation alloc; - gtk_widget_get_allocation(fixed, &alloc); + gtk_widget_get_allocation (fixed, &alloc); g_object_ref (fixed); GtkCssProvider *provider = FRAME_X_OUTPUT (f)->border_color_css_provider; @@ -3545,7 +3545,7 @@ pgtk_draw_fringe_bitmap (struct window *w, struct glyph_row *row, p->wd, p->h, p->x, p->y, p->overlay_p); } - pgtk_end_cr_clip(f); + pgtk_end_cr_clip (f); } static struct atimer *hourglass_atimer = NULL; @@ -5368,7 +5368,7 @@ pgtk_handle_draw (GtkWidget * widget, cairo_t * cr, gpointer * data) PGTK_TRACE (" garbaged=%d", f->garbaged); PGTK_TRACE (" scroll_bar_width=%f", (double) PGTK_SCROLL_BAR_WIDTH (f)); - // PGTK_TRACE(" scroll_bar_adjust=%d", PGTK_SCROLL_BAR_ADJUST(f)); + // PGTK_TRACE(" scroll_bar_adjust=%d", PGTK_SCROLL_BAR_ADJUST (f)); PGTK_TRACE (" scroll_bar_cols=%d", FRAME_SCROLL_BAR_COLS (f)); PGTK_TRACE (" column_width=%d", FRAME_COLUMN_WIDTH (f)); cairo_set_source_surface (cr, src, 0, 0); @@ -6611,7 +6611,7 @@ scroll_event (GtkWidget * widget, GdkEvent * event, gpointer * user_data) int nlines = dpyinfo->scroll.acc_y / dpyinfo->scroll.y_per_line; inev.ie.kind = WHEEL_EVENT; inev.ie.modifiers |= down_modifier; - inev.ie.arg = make_fixnum(nlines); + inev.ie.arg = make_fixnum (nlines); dpyinfo->scroll.acc_y -= dpyinfo->scroll.y_per_line * nlines; } else if (dpyinfo->scroll.acc_y <= -dpyinfo->scroll.y_per_line) @@ -6619,7 +6619,7 @@ scroll_event (GtkWidget * widget, GdkEvent * event, gpointer * user_data) int nlines = -dpyinfo->scroll.acc_y / dpyinfo->scroll.y_per_line; inev.ie.kind = WHEEL_EVENT; inev.ie.modifiers |= up_modifier; - inev.ie.arg = make_fixnum(nlines); + inev.ie.arg = make_fixnum (nlines); dpyinfo->scroll.acc_y -= -dpyinfo->scroll.y_per_line * nlines; } else if (dpyinfo->scroll.acc_x >= dpyinfo->scroll.x_per_char) @@ -6627,7 +6627,7 @@ scroll_event (GtkWidget * widget, GdkEvent * event, gpointer * user_data) int nchars = dpyinfo->scroll.acc_x / dpyinfo->scroll.x_per_char; inev.ie.kind = HORIZ_WHEEL_EVENT; inev.ie.modifiers |= up_modifier; - inev.ie.arg = make_fixnum(nchars); + inev.ie.arg = make_fixnum (nchars); dpyinfo->scroll.acc_x -= dpyinfo->scroll.x_per_char * nchars; } else if (dpyinfo->scroll.acc_x <= -dpyinfo->scroll.x_per_char) @@ -6635,7 +6635,7 @@ scroll_event (GtkWidget * widget, GdkEvent * event, gpointer * user_data) int nchars = -dpyinfo->scroll.acc_x / dpyinfo->scroll.x_per_char; inev.ie.kind = HORIZ_WHEEL_EVENT; inev.ie.modifiers |= down_modifier; - inev.ie.arg = make_fixnum(nchars); + inev.ie.arg = make_fixnum (nchars); dpyinfo->scroll.acc_x -= -dpyinfo->scroll.x_per_char * nchars; } } @@ -6806,7 +6806,7 @@ same_x_server (const char *name1, const char *name2) #define GNOME_INTERFACE_SCHEMA "org.gnome.desktop.interface" -static gdouble pgtk_text_scaling_factor(void) +static gdouble pgtk_text_scaling_factor (void) { GSettingsSchemaSource *schema_source = g_settings_schema_source_get_default (); if (schema_source != NULL) @@ -6999,7 +6999,7 @@ pgtk_term_init (Lisp_Object display_name, char *resource_name) if (dpi < 0) dpi = 96.0; - dpi *= pgtk_text_scaling_factor(); + dpi *= pgtk_text_scaling_factor (); dpyinfo->resx = dpi; dpyinfo->resy = dpi; } diff --git a/src/pgtkterm.h b/src/pgtkterm.h index c87a5e13ec0..46266fdfd9e 100644 --- a/src/pgtkterm.h +++ b/src/pgtkterm.h @@ -44,9 +44,9 @@ along with GNU Emacs. If not, see . */ extern void pgtk_log (const char *file, int lineno, const char *fmt, ...) ATTRIBUTE_FORMAT_PRINTF (3, 4); -#define PGTK_TRACE(fmt, ...) pgtk_log(__FILE__, __LINE__, fmt, ## __VA_ARGS__) +#define PGTK_TRACE(fmt, ...) pgtk_log (__FILE__, __LINE__, fmt, ## __VA_ARGS__) extern void pgtk_backtrace (const char *file, int lineno); -#define PGTK_BACKTRACE() pgtk_backtrace(__FILE__, __LINE__) +#define PGTK_BACKTRACE() pgtk_backtrace (__FILE__, __LINE__) #else #define PGTK_TRACE(fmt, ...) ((void) 0) #define PGTK_BACKTRACE() ((void) 0) @@ -434,26 +434,26 @@ enum #define FRAME_X_OUTPUT(f) ((f)->output_data.pgtk) #define FRAME_OUTPUT_DATA(f) FRAME_X_OUTPUT (f) -#define FRAME_DISPLAY_INFO(f) (FRAME_X_OUTPUT(f)->display_info) -#define FRAME_FOREGROUND_COLOR(f) (FRAME_X_OUTPUT(f)->foreground_color) -#define FRAME_BACKGROUND_COLOR(f) (FRAME_X_OUTPUT(f)->background_color) -#define FRAME_CURSOR_COLOR(f) (FRAME_X_OUTPUT(f)->cursor_color) -#define FRAME_POINTER_TYPE(f) (FRAME_X_OUTPUT(f)->current_pointer) -#define FRAME_FONT(f) (FRAME_X_OUTPUT(f)->font) -#define FRAME_GTK_OUTER_WIDGET(f) (FRAME_X_OUTPUT(f)->widget) -#define FRAME_GTK_WIDGET(f) (FRAME_X_OUTPUT(f)->edit_widget) -#define FRAME_WIDGET(f) (FRAME_GTK_OUTER_WIDGET(f) ? \ - FRAME_GTK_OUTER_WIDGET(f) : \ - FRAME_GTK_WIDGET(f)) +#define FRAME_DISPLAY_INFO(f) (FRAME_X_OUTPUT (f)->display_info) +#define FRAME_FOREGROUND_COLOR(f) (FRAME_X_OUTPUT (f)->foreground_color) +#define FRAME_BACKGROUND_COLOR(f) (FRAME_X_OUTPUT (f)->background_color) +#define FRAME_CURSOR_COLOR(f) (FRAME_X_OUTPUT (f)->cursor_color) +#define FRAME_POINTER_TYPE(f) (FRAME_X_OUTPUT (f)->current_pointer) +#define FRAME_FONT(f) (FRAME_X_OUTPUT (f)->font) +#define FRAME_GTK_OUTER_WIDGET(f) (FRAME_X_OUTPUT (f)->widget) +#define FRAME_GTK_WIDGET(f) (FRAME_X_OUTPUT (f)->edit_widget) +#define FRAME_WIDGET(f) (FRAME_GTK_OUTER_WIDGET (f) ? \ + FRAME_GTK_OUTER_WIDGET (f) : \ + FRAME_GTK_WIDGET (f)) /* aliases */ -#define FRAME_PGTK_VIEW(f) FRAME_GTK_WIDGET(f) -#define FRAME_X_WINDOW(f) FRAME_GTK_OUTER_WIDGET(f) -#define FRAME_NATIVE_WINDOW(f) GTK_WINDOW(FRAME_X_WINDOW(f)) +#define FRAME_PGTK_VIEW(f) FRAME_GTK_WIDGET (f) +#define FRAME_X_WINDOW(f) FRAME_GTK_OUTER_WIDGET (f) +#define FRAME_NATIVE_WINDOW(f) GTK_WINDOW (FRAME_X_WINDOW (f)) -#define FRAME_X_DISPLAY(f) (FRAME_DISPLAY_INFO(f)->gdpy) +#define FRAME_X_DISPLAY(f) (FRAME_DISPLAY_INFO (f)->gdpy) -#define DEFAULT_GDK_DISPLAY() gdk_display_get_default() +#define DEFAULT_GDK_DISPLAY() gdk_display_get_default () /* Turning a lisp vector value into a pointer to a struct scroll_bar. */ #define XSCROLL_BAR(vec) ((struct scroll_bar *) XVECTOR (vec)) @@ -495,7 +495,7 @@ enum (FRAME_SCROLL_BAR_LINES (f) * FRAME_LINE_HEIGHT (f) \ - PGTK_SCROLL_BAR_HEIGHT (f)) : 0) -#define FRAME_MENUBAR_HEIGHT(f) (FRAME_X_OUTPUT(f)->menubar_height) +#define FRAME_MENUBAR_HEIGHT(f) (FRAME_X_OUTPUT (f)->menubar_height) /* Calculate system coordinates of the left and top of the parent window or, if there is no parent window, the screen. */ @@ -521,9 +521,9 @@ enum #define FRAME_TOOLBAR_WIDTH(f) \ (FRAME_TOOLBAR_LEFT_WIDTH (f) + FRAME_TOOLBAR_RIGHT_WIDTH (f)) -#define FRAME_FONTSET(f) (FRAME_X_OUTPUT(f)->fontset) +#define FRAME_FONTSET(f) (FRAME_X_OUTPUT (f)->fontset) -#define FRAME_BASELINE_OFFSET(f) (FRAME_X_OUTPUT(f)->baseline_offset) +#define FRAME_BASELINE_OFFSET(f) (FRAME_X_OUTPUT (f)->baseline_offset) #define BLACK_PIX_DEFAULT(f) 0x000000 #define WHITE_PIX_DEFAULT(f) 0xFFFFFF diff --git a/src/window.h b/src/window.h index 3a75c99813d..8e9a2eb3177 100644 --- a/src/window.h +++ b/src/window.h @@ -756,7 +756,7 @@ wset_next_buffers (struct window *w, Lisp_Object val) #endif /* True if W is a tab bar window. */ -#if defined (HAVE_WINDOW_SYSTEM) && !defined(HAVE_PGTK) +#if defined (HAVE_WINDOW_SYSTEM) && !defined (HAVE_PGTK) # define WINDOW_TAB_BAR_P(W) \ (WINDOWP (WINDOW_XFRAME (W)->tab_bar_window) \ && (W) == XWINDOW (WINDOW_XFRAME (W)->tab_bar_window)) diff --git a/src/xdisp.c b/src/xdisp.c index 1ecc6aa9cfd..5b67bcf5dce 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -15650,7 +15650,7 @@ redisplay_internal (void) if (!fr->glyphs_initialized_p) return; -#if defined (USE_X_TOOLKIT) || (defined (USE_GTK) && !defined(HAVE_PGTK)) || defined (HAVE_NS) +#if defined (USE_X_TOOLKIT) || (defined (USE_GTK) && !defined (HAVE_PGTK)) || defined (HAVE_NS) if (popup_activated ()) { return; @@ -29341,7 +29341,7 @@ draw_glyphs (struct window *w, int x, struct glyph_row *row, return x_reached; } -static int draw_glyphs_debug(const char *file, int lineno, +static int draw_glyphs_debug (const char *file, int lineno, struct window *w, int x, struct glyph_row *row, enum glyph_row_area area, ptrdiff_t start, ptrdiff_t end, enum draw_glyphs_face hl, int overlaps) @@ -29349,7 +29349,7 @@ static int draw_glyphs_debug(const char *file, int lineno, return draw_glyphs(w, x, row, area, start, end, hl, overlaps); } #define draw_glyphs(w, x, r, a, s, e, h, o) \ - draw_glyphs_debug(__FILE__, __LINE__, w, x, r, a, s, e, h, o) + draw_glyphs_debug (__FILE__, __LINE__, w, x, r, a, s, e, h, o) /* Find the first glyph in the run of underlined glyphs preceding the beginning of glyph string S, and return its font (which could be @@ -33708,7 +33708,7 @@ note_mouse_highlight (struct frame *f, int x, int y) struct buffer *b; /* When a menu is active, don't highlight because this looks odd. */ -#if defined (USE_X_TOOLKIT) || (defined (USE_GTK) && !defined(HAVE_PGTK)) || defined (HAVE_NS) || defined (MSDOS) +#if defined (USE_X_TOOLKIT) || (defined (USE_GTK) && !defined (HAVE_PGTK)) || defined (HAVE_NS) || defined (MSDOS) if (popup_activated ()) return; #endif