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 Library 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 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library 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-1999. 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 #include <gdk/gdkcc.h>
31 #include <gdk/gdkcolor.h>
32 #include <gdk/gdkcursor.h>
33 #include <gdk/gdkdnd.h>
34 #include <gdk/gdkdrawable.h>
35 #include <gdk/gdkevents.h>
36 #include <gdk/gdkfont.h>
37 #include <gdk/gdkgc.h>
38 #include <gdk/gdkim.h>
39 #include <gdk/gdkimage.h>
40 #include <gdk/gdkinput.h>
41 #include <gdk/gdkpango.h>
42 #include <gdk/gdkpixbuf.h>
43 #include <gdk/gdkpixmap.h>
44 #include <gdk/gdkproperty.h>
45 #include <gdk/gdkregion.h>
46 #include <gdk/gdkrgb.h>
47 #include <gdk/gdkselection.h>
48 #include <gdk/gdktypes.h>
49 #include <gdk/gdkvisual.h>
50 #include <gdk/gdkwindow.h>
52 #include <gdk/gdkcompat.h>
56 #endif /* __cplusplus */
59 /* Initialization, exit and events
61 #define GDK_PRIORITY_EVENTS (G_PRIORITY_DEFAULT)
62 void gdk_init (gint *argc,
64 gboolean gdk_init_check (gint *argc,
66 void gdk_exit (gint error_code);
67 gchar* gdk_set_locale (void);
69 /* Push and pop error handlers for X errors
71 void gdk_error_trap_push (void);
72 gint gdk_error_trap_pop (void);
75 void gdk_set_use_xshm (gboolean use_xshm);
77 gboolean gdk_get_use_xshm (void);
78 gchar* gdk_get_display (void);
80 gint gdk_input_add_full (gint source,
81 GdkInputCondition condition,
82 GdkInputFunction function,
84 GdkDestroyNotify destroy);
85 gint gdk_input_add (gint source,
86 GdkInputCondition condition,
87 GdkInputFunction function,
89 void gdk_input_remove (gint tag);
91 gint gdk_pointer_grab (GdkWindow *window,
92 gboolean owner_events,
93 GdkEventMask event_mask,
94 GdkWindow *confine_to,
97 void gdk_pointer_ungrab (guint32 time);
98 gint gdk_keyboard_grab (GdkWindow *window,
99 gboolean owner_events,
101 void gdk_keyboard_ungrab (guint32 time);
102 gboolean gdk_pointer_is_grabbed (void);
104 gint gdk_screen_width (void);
105 gint gdk_screen_height (void);
107 gint gdk_screen_width_mm (void);
108 gint gdk_screen_height_mm (void);
110 void gdk_flush (void);
111 void gdk_beep (void);
113 void gdk_key_repeat_disable (void);
114 void gdk_key_repeat_restore (void);
116 /* Rectangle utilities
118 gboolean gdk_rectangle_intersect (GdkRectangle *src1,
121 void gdk_rectangle_union (GdkRectangle *src1,
125 /* Conversion functions between wide char and multibyte strings.
127 gchar *gdk_wcstombs (const GdkWChar *src);
128 gint gdk_mbstowcs (GdkWChar *dest,
133 void gdk_event_send_clientmessage_toall (GdkEvent *event);
134 gboolean gdk_event_send_client_message (GdkEvent *event,
139 gchar* gdk_keyval_name (guint keyval);
140 guint gdk_keyval_from_name (const gchar *keyval_name);
141 void gdk_keyval_convert_case (guint symbol,
144 guint gdk_keyval_to_upper (guint keyval);
145 guint gdk_keyval_to_lower (guint keyval);
146 gboolean gdk_keyval_is_upper (guint keyval);
147 gboolean gdk_keyval_is_lower (guint keyval);
149 guint32 gdk_keyval_to_unicode (guint keyval);
150 guint gdk_unicode_to_keyval (guint32 wc);
155 GDKVAR GMutex *gdk_threads_mutex;
157 void gdk_threads_enter (void);
158 void gdk_threads_leave (void);
160 #ifdef G_THREADS_ENABLED
161 # define GDK_THREADS_ENTER() G_STMT_START { \
162 if (gdk_threads_mutex) \
163 g_mutex_lock (gdk_threads_mutex); \
165 # define GDK_THREADS_LEAVE() G_STMT_START { \
166 if (gdk_threads_mutex) \
167 g_mutex_unlock (gdk_threads_mutex); \
169 #else /* !G_THREADS_ENABLED */
170 # define GDK_THREADS_ENTER()
171 # define GDK_THREADS_LEAVE()
172 #endif /* !G_THREADS_ENABLED */
176 #endif /* __cplusplus */
179 #endif /* __GDK_H__ */