root/src/pgtkterm.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. SELECTION_EVENT_DISPLAY

     1 /* Definitions and headers for communication with pure Gtk+3.
     2    Copyright (C) 1989, 1993, 2005, 2008-2023 Free Software Foundation,
     3    Inc.
     4 
     5 This file is part of GNU Emacs.
     6 
     7 GNU Emacs is free software: you can redistribute it and/or modify
     8 it under the terms of the GNU General Public License as published by
     9 the Free Software Foundation, either version 3 of the License, or (at
    10 your option) any later version.
    11 
    12 GNU Emacs is distributed in the hope that it will be useful,
    13 but WITHOUT ANY WARRANTY; without even the implied warranty of
    14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    15 GNU General Public License for more details.
    16 
    17 You should have received a copy of the GNU General Public License
    18 along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
    19 
    20 #ifndef _PGTKTERM_H_
    21 #define _PGTKTERM_H_
    22 
    23 #include "dispextern.h"
    24 #include "frame.h"
    25 #include "character.h"
    26 #include "font.h"
    27 #include "sysselect.h"
    28 
    29 #ifdef HAVE_PGTK
    30 
    31 #include <gtk/gtk.h>
    32 
    33 #ifdef CAIRO_HAS_PDF_SURFACE
    34 #include <cairo-pdf.h>
    35 #endif
    36 #ifdef CAIRO_HAS_PS_SURFACE
    37 #include <cairo-ps.h>
    38 #endif
    39 #ifdef CAIRO_HAS_SVG_SURFACE
    40 #include <cairo-svg.h>
    41 #endif
    42 
    43 struct pgtk_bitmap_record
    44 {
    45   char *file;
    46   int refcount;
    47   int height, width, depth;
    48   cairo_pattern_t *pattern;
    49 };
    50 
    51 struct pgtk_device_t
    52 {
    53   GdkSeat *seat;
    54   GdkDevice *device;
    55 
    56   Lisp_Object name;
    57   struct pgtk_device_t *next;
    58 };
    59 
    60 #define RGB_TO_ULONG(r, g, b) (((r) << 16) | ((g) << 8) | (b))
    61 #define ARGB_TO_ULONG(a, r, g, b) (((a) << 24) | ((r) << 16) | ((g) << 8) | (b))
    62 
    63 #define ALPHA_FROM_ULONG(color) ((color) >> 24)
    64 #define RED_FROM_ULONG(color)   (((color) >> 16) & 0xff)
    65 #define GREEN_FROM_ULONG(color) (((color) >> 8) & 0xff)
    66 #define BLUE_FROM_ULONG(color)  ((color) & 0xff)
    67 
    68 struct scroll_bar
    69 {
    70   /* These fields are shared by all vectors.  */
    71   union vectorlike_header header;
    72 
    73   /* The window we're a scroll bar for.  */
    74   Lisp_Object window;
    75 
    76   /* The next and previous in the chain of scroll bars in this frame.  */
    77   Lisp_Object next, prev;
    78 
    79   /* Fields from `x_window' down will not be traced by the GC.  */
    80 
    81   /* The X window representing this scroll bar.  */
    82   Window x_window;
    83 
    84   /* The position and size of the scroll bar in pixels, relative to the
    85      frame.  */
    86   int top, left, width, height;
    87 
    88   /* The starting and ending positions of the handle, relative to the
    89      handle area (i.e. zero is the top position, not
    90      SCROLL_BAR_TOP_BORDER).  If they're equal, that means the handle
    91      hasn't been drawn yet.
    92 
    93      These are not actually the locations where the beginning and end
    94      are drawn; in order to keep handles from becoming invisible when
    95      editing large files, we establish a minimum height by always
    96      drawing handle bottoms VERTICAL_SCROLL_BAR_MIN_HANDLE pixels below
    97      where they would be normally; the bottom and top are in a
    98      different coordinate system.  */
    99   int start, end;
   100 
   101   /* If the scroll bar handle is currently being dragged by the user,
   102      this is the number of pixels from the top of the handle to the
   103      place where the user grabbed it.  If the handle isn't currently
   104      being dragged, this is -1.  */
   105   int dragging;
   106 
   107 #if defined (USE_TOOLKIT_SCROLL_BARS) && defined (USE_LUCID)
   108   /* Last scroll bar part seen in xaw_jump_callback and xaw_scroll_callback.  */
   109   enum scroll_bar_part last_seen_part;
   110 #endif
   111 
   112 #if defined (USE_TOOLKIT_SCROLL_BARS) && !defined (USE_GTK)
   113   /* Last value of whole for horizontal scrollbars.  */
   114   int whole;
   115 #endif
   116 
   117   /* True if the scroll bar is horizontal.  */
   118   bool horizontal;
   119 };
   120 
   121 struct pgtk_display_info
   122 {
   123   /* Chain of all pgtk_display_info structures.  */
   124   struct pgtk_display_info *next;
   125 
   126   /* The generic display parameters corresponding to this PGTK display. */
   127   struct terminal *terminal;
   128 
   129   union
   130   {
   131     /* This says how to access this display through GDK.  */
   132     GdkDisplay *gdpy;
   133 
   134     /* An alias defined to make porting X code easier.  */
   135     GdkDisplay *display;
   136   };
   137 
   138   /* This is a cons cell of the form (NAME . FONT-LIST-CACHE).  */
   139   Lisp_Object name_list_element;
   140 
   141   /* Number of frames that are on this display.  */
   142   int reference_count;
   143 
   144   /* Logical identifier of this display.  */
   145   unsigned x_id;
   146 
   147   /* Default name for all frames on this display.  */
   148   char *x_id_name;
   149 
   150   /* The number of fonts loaded. */
   151   int n_fonts;
   152 
   153   /* Minimum width over all characters in all fonts in font_table.  */
   154   int smallest_char_width;
   155 
   156   /* Minimum font height over all fonts in font_table.  */
   157   int smallest_font_height;
   158 
   159   struct pgtk_bitmap_record *bitmaps;
   160   ptrdiff_t bitmaps_size;
   161   ptrdiff_t bitmaps_last;
   162 
   163   /* DPI resolution of this screen */
   164   double resx, resy;
   165 
   166   /* Mask of things that cause the mouse to be grabbed */
   167   int grabbed;
   168 
   169   int n_planes;
   170 
   171   int color_p;
   172 
   173   /* Emacs bitmap-id of the default icon bitmap for this frame.
   174      Or -1 if none has been allocated yet.  */
   175   ptrdiff_t icon_bitmap_id;
   176 
   177   Window root_window;
   178 
   179   /* Xism */
   180   XrmDatabase rdb;
   181 
   182   /* The cursor to use for vertical scroll bars. */
   183   Emacs_Cursor vertical_scroll_bar_cursor;
   184 
   185   /* The cursor to use for horizontal scroll bars. */
   186   Emacs_Cursor horizontal_scroll_bar_cursor;
   187 
   188   /* Information about the range of text currently shown in
   189      mouse-face.  */
   190   Mouse_HLInfo mouse_highlight;
   191 
   192   struct frame *highlight_frame;
   193   struct frame *x_focus_frame;
   194 
   195   /* The last frame mentioned in a FocusIn or FocusOut event.  This is
   196      separate from x_focus_frame, because whether or not LeaveNotify
   197      events cause us to lose focus depends on whether or not we have
   198      received a FocusIn event for it.  */
   199   struct frame *x_focus_event_frame;
   200 
   201   /* The frame where the mouse was last time we reported a mouse event.  */
   202   struct frame *last_mouse_frame;
   203 
   204   /* The frame where the mouse was last time we reported a mouse motion.  */
   205   struct frame *last_mouse_motion_frame;
   206 
   207   /* Position where the mouse was last time we reported a motion.
   208      This is a position on last_mouse_motion_frame.  */
   209   int last_mouse_motion_x;
   210   int last_mouse_motion_y;
   211 
   212   /* Where the mouse was last time we reported a mouse position.  */
   213   XRectangle last_mouse_glyph;
   214 
   215   /* Time of last mouse movement.  */
   216   Time last_mouse_movement_time;
   217 
   218   /* Time of last user interaction.  */
   219   guint32 last_user_time;
   220 
   221   /* The scroll bar in which the last motion event occurred.  */
   222   void *last_mouse_scroll_bar;
   223 
   224   /* The invisible cursor used for pointer blanking.  */
   225   Emacs_Cursor invisible_cursor;
   226 
   227   /* The GDK cursor for scroll bars and popup menus.  */
   228   GdkCursor *xg_cursor;
   229 
   230   /* List of all devices for all seats on this display.  */
   231   struct pgtk_device_t *devices;
   232 
   233   /* The frame where the mouse was last time we reported a mouse position.  */
   234   struct frame *last_mouse_glyph_frame;
   235 
   236   /* The last click event. */
   237   GdkEvent *last_click_event;
   238 
   239   /* IM context data.  */
   240   struct
   241   {
   242     GtkIMContext *context;
   243     struct frame *focused_frame;
   244   } im;
   245 
   246   struct
   247   {
   248     double acc_x, acc_y;
   249     double x_per_char, y_per_line;
   250   } scroll;
   251 
   252   int connection;
   253 };
   254 
   255 /* This is a chain of structures for all the PGTK displays currently in use.  */
   256 extern struct pgtk_display_info *x_display_list;
   257 
   258 struct pgtk_output
   259 {
   260   unsigned long foreground_color;
   261   unsigned long background_color;
   262   void *toolbar;
   263 
   264   /* The "time" of the last user interaction on this display.  Set
   265      upon button and key press and release events.
   266 
   267      Under the GDK Wayland backend, this is actually an event
   268      serial.  */
   269   guint32 last_user_time;
   270 
   271   /* Cursors */
   272   Emacs_Cursor current_cursor;
   273   Emacs_Cursor text_cursor;
   274   Emacs_Cursor nontext_cursor;
   275   Emacs_Cursor modeline_cursor;
   276   Emacs_Cursor hand_cursor;
   277   Emacs_Cursor hourglass_cursor;
   278   Emacs_Cursor horizontal_drag_cursor;
   279   Emacs_Cursor vertical_drag_cursor;
   280   Emacs_Cursor left_edge_cursor;
   281   Emacs_Cursor top_left_corner_cursor;
   282   Emacs_Cursor top_edge_cursor;
   283   Emacs_Cursor top_right_corner_cursor;
   284   Emacs_Cursor right_edge_cursor;
   285   Emacs_Cursor bottom_right_corner_cursor;
   286   Emacs_Cursor bottom_edge_cursor;
   287   Emacs_Cursor bottom_left_corner_cursor;
   288 
   289   /* PGTK-specific */
   290   Emacs_Cursor current_pointer;
   291 
   292   /* border color */
   293   unsigned long border_pixel;
   294   GtkCssProvider *border_color_css_provider;
   295 
   296   /* scrollbar color */
   297   GtkCssProvider *scrollbar_foreground_css_provider;
   298   GtkCssProvider *scrollbar_background_css_provider;
   299 
   300   /* Widget whose cursor is hourglass_cursor.  This widget is temporarily
   301      mapped to display an hourglass cursor.  */
   302   GtkWidget *hourglass_widget;
   303 
   304   Emacs_GC cursor_xgcv;
   305 
   306   /* lord knows why Emacs needs to know about our Window ids.. */
   307   Window window_desc, parent_desc;
   308   char explicit_parent;
   309 
   310   /* If >=0, a bitmap index.  The indicated bitmap is used for the
   311      icon. */
   312   ptrdiff_t icon_bitmap;
   313 
   314   struct font *font;
   315   int baseline_offset;
   316 
   317   /* If a fontset is specified for this frame instead of font, this
   318      value contains an ID of the fontset, else -1.  */
   319   int fontset;                  /* only used with font_backend */
   320 
   321   unsigned long mouse_color;
   322   unsigned long cursor_color;
   323   unsigned long cursor_foreground_color;
   324 
   325   int icon_top;
   326   int icon_left;
   327 
   328   /* The size of the extra width currently allotted for vertical
   329      scroll bars, in pixels.  */
   330   int vertical_scroll_bar_extra;
   331 
   332   /* The height of the titlebar decoration (included in PGTKWindow's frame). */
   333   int titlebar_height;
   334 
   335   /* The height of the toolbar if displayed, else 0. */
   336   int toolbar_height;
   337 
   338   /* This is the Emacs structure for the PGTK display this frame is on.  */
   339   struct pgtk_display_info *display_info;
   340 
   341   /* Non-zero if we are zooming (maximizing) the frame.  */
   342   int zooming;
   343 
   344   /* Non-zero if we are doing an animation, e.g. toggling the tool bar. */
   345   int in_animation;
   346 
   347   /* The last size hints set.  */
   348   GdkGeometry size_hints;
   349   long hint_flags;
   350   int preferred_width, preferred_height;
   351 
   352   /* The widget of this screen.  This is the window of a top widget.  */
   353   GtkWidget *widget;
   354   /* The widget of the edit portion of this screen; the window in
   355      "window_desc" is inside of this.  */
   356   GtkWidget *edit_widget;
   357   /* The widget used for laying out widgets vertically.  */
   358   GtkWidget *vbox_widget;
   359   /* The widget used for laying out widgets horizontally.  */
   360   GtkWidget *hbox_widget;
   361   /* The menubar in this frame.  */
   362   GtkWidget *menubar_widget;
   363   /* The tool bar in this frame  */
   364   GtkWidget *toolbar_widget;
   365   /* True if tool bar is packed into the hbox widget (i.e. vertical).  */
   366   bool_bf toolbar_in_hbox : 1;
   367   bool_bf toolbar_is_packed : 1;
   368 
   369   GtkTooltip *ttip_widget;
   370   GtkWidget *ttip_lbl;
   371   GtkWindow *ttip_window;
   372 
   373   /* Height of menu bar widget, in pixels.  This value
   374      is not meaningful if the menubar is turned off.  */
   375   int menubar_height;
   376 
   377   /* Height of tool bar widget, in pixels.  top_height is used if tool bar
   378      at top, bottom_height if tool bar is at the bottom.
   379      Zero if not using an external tool bar or if tool bar is vertical.  */
   380   int toolbar_top_height, toolbar_bottom_height;
   381 
   382   /* Width of tool bar widget, in pixels.  left_width is used if tool bar
   383      at left, right_width if tool bar is at the right.
   384      Zero if not using an external tool bar or if tool bar is horizontal.  */
   385   int toolbar_left_width, toolbar_right_width;
   386 
   387 #ifdef USE_CAIRO
   388   /* Cairo drawing contexts.  */
   389   cairo_t *cr_context, *cr_active;
   390   int cr_surface_desired_width, cr_surface_desired_height;
   391   /* Cairo surface for double buffering */
   392   cairo_surface_t *cr_surface_visible_bell;
   393 #endif
   394   struct atimer *atimer_visible_bell;
   395 
   396   int has_been_visible;
   397 
   398   /* Relief GCs, colors etc.  */
   399   struct relief
   400   {
   401     Emacs_GC xgcv;
   402     unsigned long pixel;
   403   }
   404   black_relief, white_relief;
   405 
   406   /* The background for which the above relief GCs were set up.
   407      They are changed only when a different background is involved.  */
   408   unsigned long relief_background;
   409 
   410   /* Whether or not a relief background has been computed for this
   411      frame.  */
   412   bool_bf relief_background_valid_p : 1;
   413 
   414   /* Keep track of focus.  May be EXPLICIT if we received a FocusIn for this
   415      frame, or IMPLICIT if we received an EnterNotify.
   416      FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */
   417   int focus_state;
   418 
   419   /* Keep track of scale factor.  If monitor's scale factor is changed, or
   420      monitor is switched and scale factor is changed, then recreate cairo_t
   421      and cairo_surface_t.  I need GTK's such signal, but there isn't, so
   422      I watch it periodically with atimer. */
   423   double watched_scale_factor;
   424   struct atimer *scale_factor_atimer;
   425 };
   426 
   427 /* Satisfy term.c.  */
   428 struct x_output
   429 {
   430   int unused;
   431 };
   432 
   433 enum
   434 {
   435   /* Values for focus_state, used as bit mask.
   436      EXPLICIT means we received a FocusIn for the frame and know it has
   437      the focus.  IMPLICIT means we received an EnterNotify and the frame
   438      may have the focus if no window manager is running.
   439      FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */
   440   FOCUS_NONE = 0,
   441   FOCUS_IMPLICIT = 1,
   442   FOCUS_EXPLICIT = 2
   443 };
   444 
   445 /* This gives the pgtk_display_info structure for the display F is on.  */
   446 #define FRAME_X_OUTPUT(f)         ((f)->output_data.pgtk)
   447 #define FRAME_OUTPUT_DATA(f)      FRAME_X_OUTPUT (f)
   448 
   449 #define FRAME_DISPLAY_INFO(f)     (FRAME_X_OUTPUT (f)->display_info)
   450 #define FRAME_FOREGROUND_COLOR(f) (FRAME_X_OUTPUT (f)->foreground_color)
   451 #define FRAME_BACKGROUND_COLOR(f) (FRAME_X_OUTPUT (f)->background_color)
   452 #define FRAME_CURSOR_COLOR(f)     (FRAME_X_OUTPUT (f)->cursor_color)
   453 #define FRAME_POINTER_TYPE(f)     (FRAME_X_OUTPUT (f)->current_pointer)
   454 #define FRAME_FONT(f)             (FRAME_X_OUTPUT (f)->font)
   455 #define FRAME_GTK_OUTER_WIDGET(f) (FRAME_X_OUTPUT (f)->widget)
   456 #define FRAME_GTK_WIDGET(f)       (FRAME_X_OUTPUT (f)->edit_widget)
   457 #define FRAME_WIDGET(f)           (FRAME_GTK_OUTER_WIDGET (f)   \
   458                                    ? FRAME_GTK_OUTER_WIDGET (f) \
   459                                    : FRAME_GTK_WIDGET (f))
   460 
   461 #define FRAME_PGTK_VIEW(f)         FRAME_GTK_WIDGET (f)
   462 #define FRAME_X_WINDOW(f)          FRAME_GTK_OUTER_WIDGET (f)
   463 #define FRAME_NATIVE_WINDOW(f)     GTK_WINDOW (FRAME_X_WINDOW (f))
   464 #define FRAME_GDK_WINDOW(f)                     \
   465   (gtk_widget_get_window (FRAME_GTK_WIDGET (f)))
   466 
   467 #define FRAME_X_DISPLAY(f)        (FRAME_DISPLAY_INFO (f)->gdpy)
   468 
   469 #define DEFAULT_GDK_DISPLAY() gdk_display_get_default ()
   470 
   471 /* Turning a lisp vector value into a pointer to a struct scroll_bar.  */
   472 #define XSCROLL_BAR(vec) ((struct scroll_bar *) XVECTOR (vec))
   473 
   474 #define FRAME_DEFAULT_FACE(f) FACE_FROM_ID_OR_NULL (f, DEFAULT_FACE_ID)
   475 #define FRAME_MENUBAR_HEIGHT(f) (FRAME_X_OUTPUT (f)->menubar_height)
   476 #define FRAME_TOOLBAR_TOP_HEIGHT(f) ((f)->output_data.pgtk->toolbar_top_height)
   477 #define FRAME_TOOLBAR_BOTTOM_HEIGHT(f) \
   478   ((f)->output_data.pgtk->toolbar_bottom_height)
   479 #define FRAME_TOOLBAR_HEIGHT(f) \
   480   (FRAME_TOOLBAR_TOP_HEIGHT (f) + FRAME_TOOLBAR_BOTTOM_HEIGHT (f))
   481 #define FRAME_TOOLBAR_LEFT_WIDTH(f) ((f)->output_data.pgtk->toolbar_left_width)
   482 #define FRAME_TOOLBAR_RIGHT_WIDTH(f) ((f)->output_data.pgtk->toolbar_right_width)
   483 #define FRAME_TOOLBAR_WIDTH(f) \
   484   (FRAME_TOOLBAR_LEFT_WIDTH (f) + FRAME_TOOLBAR_RIGHT_WIDTH (f))
   485 
   486 #define FRAME_FONTSET(f) (FRAME_X_OUTPUT (f)->fontset)
   487 
   488 #define FRAME_BASELINE_OFFSET(f) (FRAME_X_OUTPUT (f)->baseline_offset)
   489 #define BLACK_PIX_DEFAULT(f) 0x000000
   490 #define WHITE_PIX_DEFAULT(f) 0xFFFFFF
   491 
   492 /* First position where characters can be shown (instead of scrollbar, if
   493    it is on left. */
   494 #define FIRST_CHAR_POSITION(f)                          \
   495   (! (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f)) ? 0   \
   496    : FRAME_SCROLL_BAR_COLS (f))
   497 
   498 #define FRAME_CR_SURFACE_DESIRED_WIDTH(f)               \
   499   ((f)->output_data.pgtk->cr_surface_desired_width)
   500 #define FRAME_CR_SURFACE_DESIRED_HEIGHT(f) \
   501   ((f)->output_data.pgtk->cr_surface_desired_height)
   502 
   503 
   504 /* If a struct input_event has a kind which is SELECTION_REQUEST_EVENT
   505    or SELECTION_CLEAR_EVENT, then its contents are really described
   506    by this structure.  */
   507 
   508 /* For an event of kind SELECTION_REQUEST_EVENT,
   509    this structure really describes the contents.  */
   510 
   511 struct selection_input_event
   512 {
   513   ENUM_BF (event_kind) kind : EVENT_KIND_WIDTH;
   514   struct pgtk_display_info *dpyinfo;
   515   /* We spell it with an "o" here because X does.  */
   516   GdkWindow *requestor;
   517   GdkAtom selection, target, property;
   518   guint32 time;
   519 };
   520 
   521 /* Unlike macros below, this can't be used as an lvalue.  */
   522 INLINE GdkDisplay *
   523 SELECTION_EVENT_DISPLAY (struct selection_input_event *ev)
   524 {
   525   return ev->dpyinfo->display;
   526 }
   527 #define SELECTION_EVENT_DPYINFO(eventp) \
   528   ((eventp)->dpyinfo)
   529 /* We spell it with an "o" here because X does.  */
   530 #define SELECTION_EVENT_REQUESTOR(eventp)       \
   531   ((eventp)->requestor)
   532 #define SELECTION_EVENT_SELECTION(eventp)       \
   533   ((eventp)->selection)
   534 #define SELECTION_EVENT_TARGET(eventp)  \
   535   ((eventp)->target)
   536 #define SELECTION_EVENT_PROPERTY(eventp)        \
   537   ((eventp)->property)
   538 #define SELECTION_EVENT_TIME(eventp)    \
   539   ((eventp)->time)
   540 
   541 extern void pgtk_handle_selection_event (struct selection_input_event *);
   542 extern void pgtk_clear_frame_selections (struct frame *);
   543 extern void pgtk_handle_property_notify (GdkEventProperty *);
   544 extern void pgtk_handle_selection_notify (GdkEventSelection *);
   545 
   546 /* Display init/shutdown functions implemented in pgtkterm.c */
   547 extern struct pgtk_display_info *pgtk_term_init (Lisp_Object, char *);
   548 extern void pgtk_term_shutdown (int);
   549 
   550 /* Implemented in pgtkterm, published in or needed from pgtkfns. */
   551 extern void pgtk_clear_frame (struct frame *);
   552 extern char *pgtk_xlfd_to_fontname (const char *);
   553 
   554 /* Implemented in pgtkfns.c.  */
   555 extern const char *pgtk_get_defaults_value (const char *);
   556 extern const char *pgtk_get_string_resource (XrmDatabase, const char *, const char *);
   557 extern void pgtk_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object);
   558 
   559 /* Color management implemented in pgtkterm. */
   560 extern bool pgtk_defined_color (struct frame *, const char *,
   561                                 Emacs_Color *, bool, bool);
   562 extern void pgtk_query_color (struct frame *, Emacs_Color *);
   563 extern void pgtk_query_colors (struct frame *, Emacs_Color *, int);
   564 extern int pgtk_parse_color (struct frame *, const char *, Emacs_Color *);
   565 
   566 /* Implemented in pgtkterm.c */
   567 extern void pgtk_clear_area (struct frame *, int, int, int, int);
   568 extern int pgtk_gtk_to_emacs_modifiers (struct pgtk_display_info *, int);
   569 extern void pgtk_clear_under_internal_border (struct frame *);
   570 extern void pgtk_set_event_handler (struct frame *);
   571 
   572 /* Implemented in pgtkterm.c */
   573 extern int pgtk_display_pixel_height (struct pgtk_display_info *);
   574 extern int pgtk_display_pixel_width (struct pgtk_display_info *);
   575 
   576 extern void pgtk_destroy_window (struct frame *);
   577 extern void pgtk_set_parent_frame (struct frame *, Lisp_Object, Lisp_Object);
   578 extern void pgtk_set_no_focus_on_map (struct frame *, Lisp_Object, Lisp_Object);
   579 extern void pgtk_set_no_accept_focus (struct frame *, Lisp_Object, Lisp_Object);
   580 extern void pgtk_set_z_group (struct frame *, Lisp_Object, Lisp_Object);
   581 
   582 /* Cairo related functions implemented in pgtkterm.c */
   583 extern void pgtk_cr_update_surface_desired_size (struct frame *, int, int, bool);
   584 extern cairo_t *pgtk_begin_cr_clip (struct frame *);
   585 extern void pgtk_end_cr_clip (struct frame *);
   586 extern void pgtk_set_cr_source_with_gc_foreground (struct frame *, Emacs_GC *, bool);
   587 extern void pgtk_set_cr_source_with_gc_background (struct frame *, Emacs_GC *, bool);
   588 extern void pgtk_set_cr_source_with_color (struct frame *, unsigned long, bool);
   589 extern void pgtk_cr_draw_frame (cairo_t *, struct frame *);
   590 extern void pgtk_cr_destroy_frame_context (struct frame *);
   591 extern Lisp_Object pgtk_cr_export_frames (Lisp_Object , cairo_surface_type_t);
   592 
   593 /* Defined in pgtkmenu.c */
   594 extern Lisp_Object pgtk_popup_dialog (struct frame *, Lisp_Object, Lisp_Object);
   595 extern Lisp_Object pgtk_dialog_show (struct frame *, Lisp_Object, Lisp_Object,
   596                                      const char **);
   597 extern void initialize_frame_menubar (struct frame *);
   598 
   599 
   600 /* Symbol initializations implemented in each pgtk sources. */
   601 extern void syms_of_pgtkterm (void);
   602 extern void syms_of_pgtkfns (void);
   603 extern void syms_of_pgtkmenu (void);
   604 extern void syms_of_pgtkselect (void);
   605 extern void syms_of_pgtkim (void);
   606 
   607 /* Initialization and marking implemented in pgtkterm.c */
   608 extern void mark_pgtkterm (void);
   609 extern void pgtk_delete_terminal (struct terminal *);
   610 
   611 extern void pgtk_make_frame_visible (struct frame *);
   612 extern void pgtk_make_frame_invisible (struct frame *);
   613 extern void pgtk_free_frame_resources (struct frame *);
   614 extern void pgtk_iconify_frame (struct frame *);
   615 extern void pgtk_focus_frame (struct frame *, bool);
   616 extern void pgtk_set_scroll_bar_default_width (struct frame *);
   617 extern void pgtk_set_scroll_bar_default_height (struct frame *);
   618 extern Lisp_Object pgtk_get_focus_frame (struct frame *);
   619 
   620 extern void pgtk_frame_rehighlight (struct pgtk_display_info *);
   621 
   622 extern void pgtk_change_tab_bar_height (struct frame *, int);
   623 
   624 extern struct pgtk_display_info *check_pgtk_display_info (Lisp_Object);
   625 
   626 extern void pgtk_default_font_parameter (struct frame *, Lisp_Object);
   627 
   628 extern void pgtk_menu_set_in_use (bool);
   629 
   630 /* Drag and drop functions used by Lisp.  */
   631 extern void pgtk_update_drop_status (Lisp_Object, Lisp_Object);
   632 extern void pgtk_finish_drop (Lisp_Object, Lisp_Object, Lisp_Object);
   633 
   634 extern void pgtk_enqueue_string (struct frame *, gchar *);
   635 extern void pgtk_enqueue_preedit (struct frame *, Lisp_Object);
   636 extern void pgtk_im_focus_in (struct frame *);
   637 extern void pgtk_im_focus_out (struct frame *);
   638 extern bool pgtk_im_filter_keypress (struct frame *, GdkEventKey *);
   639 extern void pgtk_im_set_cursor_location (struct frame *, int, int,
   640                                          int, int);
   641 extern void pgtk_im_init (struct pgtk_display_info *);
   642 extern void pgtk_im_finish (struct pgtk_display_info *);
   643 
   644 extern bool xg_set_icon (struct frame *, Lisp_Object);
   645 extern bool xg_set_icon_from_xpm_data (struct frame *, const char **);
   646 
   647 extern bool pgtk_text_icon (struct frame *, const char *);
   648 
   649 extern double pgtk_frame_scale_factor (struct frame *);
   650 extern int pgtk_emacs_to_gtk_modifiers (struct pgtk_display_info *, int);
   651 
   652 #endif /* HAVE_PGTK */
   653 #endif /* _PGTKTERM_H_ */

/* [<][>][^][v][top][bottom][index][help] */