1 /* GDK - The GIMP Drawing Kit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
21 * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
22 * file for a list of people on the GTK+ Team. See the ChangeLog
23 * files for a list of changes. These files are distributed with
24 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
30 #define __GDK_H_INSIDE__
32 #include <gdk/gdkapplaunchcontext.h>
33 #include <gdk/gdkcairo.h>
34 #include <gdk/gdkcolor.h>
35 #include <gdk/gdkcursor.h>
36 #include <gdk/gdkdevice.h>
37 #include <gdk/gdkdevicemanager.h>
38 #include <gdk/gdkdisplay.h>
39 #include <gdk/gdkdisplaymanager.h>
40 #include <gdk/gdkdnd.h>
41 #include <gdk/gdkdrawable.h>
42 #include <gdk/gdkenumtypes.h>
43 #include <gdk/gdkevents.h>
44 #include <gdk/gdkgc.h>
45 #include <gdk/gdkimage.h>
46 #include <gdk/gdkinput.h>
47 #include <gdk/gdkkeys.h>
48 #include <gdk/gdkpango.h>
49 #include <gdk/gdkpixbuf.h>
50 #include <gdk/gdkpixmap.h>
51 #include <gdk/gdkproperty.h>
52 #include <gdk/gdkrgb.h>
53 #include <gdk/gdkscreen.h>
54 #include <gdk/gdkselection.h>
55 #include <gdk/gdkspawn.h>
56 #include <gdk/gdktestutils.h>
57 #include <gdk/gdktypes.h>
58 #include <gdk/gdkvisual.h>
59 #include <gdk/gdkwindow.h>
61 #undef __GDK_H_INSIDE__
66 /* Initialization, exit and events
68 #define GDK_PRIORITY_EVENTS (G_PRIORITY_DEFAULT)
69 void gdk_enable_multidevice (void);
70 void gdk_parse_args (gint *argc,
72 void gdk_init (gint *argc,
74 gboolean gdk_init_check (gint *argc,
76 void gdk_add_option_entries_libgtk_only (GOptionGroup *group);
77 void gdk_pre_parse_libgtk_only (void);
79 gchar* gdk_set_locale (void);
81 G_CONST_RETURN char *gdk_get_program_class (void);
82 void gdk_set_program_class (const char *program_class);
84 /* Push and pop error handlers for X errors
86 void gdk_error_trap_push (void);
87 gint gdk_error_trap_pop (void);
89 gchar* gdk_get_display (void);
90 G_CONST_RETURN gchar* gdk_get_display_arg_name (void);
92 #ifndef GDK_MULTIDEVICE_SAFE
93 GdkGrabStatus gdk_pointer_grab (GdkWindow *window,
94 gboolean owner_events,
95 GdkEventMask event_mask,
96 GdkWindow *confine_to,
99 GdkGrabStatus gdk_keyboard_grab (GdkWindow *window,
100 gboolean owner_events,
102 #endif /* GDK_MULTIDEVICE_SAFE */
104 #ifndef GDK_MULTIHEAD_SAFE
106 #ifndef GDK_MULTIDEVICE_SAFE
107 void gdk_pointer_ungrab (guint32 time_);
108 void gdk_keyboard_ungrab (guint32 time_);
109 gboolean gdk_pointer_is_grabbed (void);
110 #endif /* GDK_MULTIDEVICE_SAFE */
112 gint gdk_screen_width (void) G_GNUC_CONST;
113 gint gdk_screen_height (void) G_GNUC_CONST;
115 gint gdk_screen_width_mm (void) G_GNUC_CONST;
116 gint gdk_screen_height_mm (void) G_GNUC_CONST;
118 void gdk_beep (void);
119 #endif /* GDK_MULTIHEAD_SAFE */
121 void gdk_flush (void);
123 #ifndef GDK_MULTIHEAD_SAFE
124 void gdk_set_double_click_time (guint msec);
127 /* Rectangle utilities
129 gboolean gdk_rectangle_intersect (const GdkRectangle *src1,
130 const GdkRectangle *src2,
132 void gdk_rectangle_union (const GdkRectangle *src1,
133 const GdkRectangle *src2,
136 GType gdk_rectangle_get_type (void) G_GNUC_CONST;
138 #define GDK_TYPE_RECTANGLE (gdk_rectangle_get_type ())
141 #ifndef GDK_MULTIHEAD_SAFE
142 gboolean gdk_event_send_client_message (GdkEvent *event,
143 GdkNativeWindow winid);
144 void gdk_event_send_clientmessage_toall (GdkEvent *event);
146 gboolean gdk_event_send_client_message_for_display (GdkDisplay *display,
148 GdkNativeWindow winid);
150 void gdk_notify_startup_complete (void);
152 void gdk_notify_startup_complete_with_id (const gchar* startup_id);
157 #if !defined (GDK_DISABLE_DEPRECATED) || defined (GDK_COMPILATION)
158 GDKVAR GMutex *gdk_threads_mutex; /* private */
161 GDKVAR GCallback gdk_threads_lock;
162 GDKVAR GCallback gdk_threads_unlock;
164 void gdk_threads_enter (void);
165 void gdk_threads_leave (void);
166 void gdk_threads_init (void);
167 void gdk_threads_set_lock_functions (GCallback enter_fn,
170 guint gdk_threads_add_idle_full (gint priority,
171 GSourceFunc function,
173 GDestroyNotify notify);
174 guint gdk_threads_add_idle (GSourceFunc function,
176 guint gdk_threads_add_timeout_full (gint priority,
178 GSourceFunc function,
180 GDestroyNotify notify);
181 guint gdk_threads_add_timeout (guint interval,
182 GSourceFunc function,
184 guint gdk_threads_add_timeout_seconds_full (gint priority,
186 GSourceFunc function,
188 GDestroyNotify notify);
189 guint gdk_threads_add_timeout_seconds (guint interval,
190 GSourceFunc function,
193 #ifdef G_THREADS_ENABLED
194 # define GDK_THREADS_ENTER() G_STMT_START { \
195 if (gdk_threads_lock) \
196 (*gdk_threads_lock) (); \
198 # define GDK_THREADS_LEAVE() G_STMT_START { \
199 if (gdk_threads_unlock) \
200 (*gdk_threads_unlock) (); \
202 #else /* !G_THREADS_ENABLED */
203 # define GDK_THREADS_ENTER()
204 # define GDK_THREADS_LEAVE()
205 #endif /* !G_THREADS_ENABLED */
210 #endif /* __GDK_H__ */