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/gdkinput.h>
45 #include <gdk/gdkkeys.h>
46 #include <gdk/gdkkeysyms.h>
47 #include <gdk/gdkpango.h>
48 #include <gdk/gdkpixbuf.h>
49 #include <gdk/gdkpixmap.h>
50 #include <gdk/gdkproperty.h>
51 #include <gdk/gdkscreen.h>
52 #include <gdk/gdkselection.h>
53 #include <gdk/gdkspawn.h>
54 #include <gdk/gdktestutils.h>
55 #include <gdk/gdktypes.h>
56 #include <gdk/gdkvisual.h>
57 #include <gdk/gdkwindow.h>
59 #undef __GDK_H_INSIDE__
64 /* Initialization, exit and events
66 #define GDK_PRIORITY_EVENTS (G_PRIORITY_DEFAULT)
67 void gdk_enable_multidevice (void);
68 void gdk_parse_args (gint *argc,
70 void gdk_init (gint *argc,
72 gboolean gdk_init_check (gint *argc,
74 void gdk_add_option_entries_libgtk_only (GOptionGroup *group);
75 void gdk_pre_parse_libgtk_only (void);
77 gchar* gdk_set_locale (void);
79 G_CONST_RETURN char *gdk_get_program_class (void);
80 void gdk_set_program_class (const char *program_class);
82 /* Push and pop error handlers for X errors
84 void gdk_error_trap_push (void);
85 /* warn unused because you could use pop_ignored otherwise */
86 G_GNUC_WARN_UNUSED_RESULT gint gdk_error_trap_pop (void);
87 void gdk_error_trap_pop_ignored (void);
90 gchar* gdk_get_display (void);
91 G_CONST_RETURN gchar* gdk_get_display_arg_name (void);
93 #ifndef GDK_MULTIDEVICE_SAFE
94 GdkGrabStatus gdk_pointer_grab (GdkWindow *window,
95 gboolean owner_events,
96 GdkEventMask event_mask,
97 GdkWindow *confine_to,
100 GdkGrabStatus gdk_keyboard_grab (GdkWindow *window,
101 gboolean owner_events,
103 #endif /* GDK_MULTIDEVICE_SAFE */
105 #ifndef GDK_MULTIHEAD_SAFE
107 #ifndef GDK_MULTIDEVICE_SAFE
108 void gdk_pointer_ungrab (guint32 time_);
109 void gdk_keyboard_ungrab (guint32 time_);
110 gboolean gdk_pointer_is_grabbed (void);
111 #endif /* GDK_MULTIDEVICE_SAFE */
113 gint gdk_screen_width (void) G_GNUC_CONST;
114 gint gdk_screen_height (void) G_GNUC_CONST;
116 gint gdk_screen_width_mm (void) G_GNUC_CONST;
117 gint gdk_screen_height_mm (void) G_GNUC_CONST;
119 void gdk_beep (void);
120 #endif /* GDK_MULTIHEAD_SAFE */
122 void gdk_flush (void);
124 #ifndef GDK_MULTIHEAD_SAFE
125 void gdk_set_double_click_time (guint msec);
128 /* Rectangle utilities
130 gboolean gdk_rectangle_intersect (const GdkRectangle *src1,
131 const GdkRectangle *src2,
133 void gdk_rectangle_union (const GdkRectangle *src1,
134 const GdkRectangle *src2,
137 GType gdk_rectangle_get_type (void) G_GNUC_CONST;
139 #define GDK_TYPE_RECTANGLE (gdk_rectangle_get_type ())
142 #ifndef GDK_MULTIHEAD_SAFE
143 gboolean gdk_event_send_client_message (GdkEvent *event,
144 GdkNativeWindow winid);
145 void gdk_event_send_clientmessage_toall (GdkEvent *event);
147 gboolean gdk_event_send_client_message_for_display (GdkDisplay *display,
149 GdkNativeWindow winid);
151 void gdk_notify_startup_complete (void);
153 void gdk_notify_startup_complete_with_id (const gchar* startup_id);
158 void gdk_threads_enter (void);
159 void gdk_threads_leave (void);
160 void gdk_threads_init (void);
161 void gdk_threads_set_lock_functions (GCallback enter_fn,
164 guint gdk_threads_add_idle_full (gint priority,
165 GSourceFunc function,
167 GDestroyNotify notify);
168 guint gdk_threads_add_idle (GSourceFunc function,
170 guint gdk_threads_add_timeout_full (gint priority,
172 GSourceFunc function,
174 GDestroyNotify notify);
175 guint gdk_threads_add_timeout (guint interval,
176 GSourceFunc function,
178 guint gdk_threads_add_timeout_seconds_full (gint priority,
180 GSourceFunc function,
182 GDestroyNotify notify);
183 guint gdk_threads_add_timeout_seconds (guint interval,
184 GSourceFunc function,
187 #define GDK_THREADS_ENTER() gdk_threads_enter()
188 #define GDK_THREADS_LEAVE() gdk_threads_leave()
193 #endif /* __GDK_H__ */