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

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