1 #ifndef __GDK__PRIVATE_H__
2 #define __GDK__PRIVATE_H__
3 
4 #include <gdk/gdk.h>
5 #include "gdk/gdkinternals.h"
6 
7 /* Private API for use in GTK+ */
8 
9 GdkDisplay *    gdk_display_open_default        (void);
10 
11 gboolean        gdk_device_grab_info            (GdkDisplay  *display,
12                                                  GdkDevice   *device,
13                                                  GdkSurface  **grab_surface,
14                                                  gboolean    *owner_events);
15 
16 void            gdk_pre_parse                   (void);
17 
18 gboolean        gdk_surface_supports_edge_constraints    (GdkSurface *surface);
19 
20 void gdk_display_set_double_click_time     (GdkDisplay   *display,
21                                             guint         msec);
22 void gdk_display_set_double_click_distance (GdkDisplay   *display,
23                                             guint         distance);
24 void gdk_display_set_cursor_theme          (GdkDisplay   *display,
25                                             const char   *theme,
26                                             int           size);
27 gboolean gdk_running_in_sandbox (void);
28 gboolean gdk_should_use_portal (void);
29 
30 const char *   gdk_get_startup_notification_id (void);
31 
32 PangoDirection gdk_unichar_direction (gunichar    ch);
33 PangoDirection gdk_find_base_dir     (const char *text,
34                                       int         len);
35 
36 void           gdk_surface_set_widget (GdkSurface *surface,
37                                        gpointer    widget);
38 gpointer       gdk_surface_get_widget (GdkSurface *surface);
39 
40 typedef struct
41 {
42   const char *key;
43   guint value;
44   const char *help;
45   gboolean always_enabled;
46 } GdkDebugKey;
47 
48 guint gdk_parse_debug_var (const char        *variable,
49                            const GdkDebugKey *keys,
50                            guint              nkeys);
51 
52 /* Backward compatibility shim, to avoid bumping up the minimum
53  * required version of GLib; most of our uses of g_memdup() are
54  * safe, and those that aren't have been fixed
55  */
56 #if !GLIB_CHECK_VERSION (2, 67, 3)
57 # define g_memdup2(mem,size)    g_memdup((mem),(size))
58 #endif
59 
60 void gdk_source_set_static_name_by_id (guint       tag,
61                                        const char *name);
62 
63 #if !GLIB_CHECK_VERSION(2, 69, 1)
64 #define g_source_set_static_name(source, name) g_source_set_name ((source), (name))
65 #endif
66 
67 #endif /* __GDK__PRIVATE_H__ */
68