]> Pileus Git - ~andy/gtk/blob - gdk/gdk.h
Add missing gdk_rectangle_get_type() prototype.
[~andy/gtk] / gdk / gdk.h
1 /* GDK - The GIMP Drawing Kit
2  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3  *
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.
8  *
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.
13  *
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.
18  */
19
20 /*
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/. 
25  */
26
27 #ifndef __GDK_H__
28 #define __GDK_H__
29
30 #include <gdk/gdkcolor.h>
31 #include <gdk/gdkcursor.h>
32 #include <gdk/gdkdnd.h>
33 #include <gdk/gdkdrawable.h>
34 #include <gdk/gdkenumtypes.h>
35 #include <gdk/gdkevents.h>
36 #include <gdk/gdkfont.h>
37 #include <gdk/gdkgc.h>
38 #include <gdk/gdkimage.h>
39 #include <gdk/gdkinput.h>
40 #include <gdk/gdkkeys.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>
51
52 #include <gdk/gdkcompat.h>
53
54 #ifdef __cplusplus
55 extern "C" {
56 #endif /* __cplusplus */
57
58
59 /* Initialization, exit and events
60  */
61 #define   GDK_PRIORITY_EVENTS           (G_PRIORITY_DEFAULT)
62 void      gdk_init                      (gint           *argc,
63                                          gchar        ***argv);
64 gboolean  gdk_init_check                (gint           *argc,
65                                          gchar        ***argv);
66
67 #ifndef GDK_DISABLE_DEPRECATED
68 void      gdk_exit                      (gint            error_code);
69 #endif /* GDK_DISABLE_DEPRECATED */
70 gchar*    gdk_set_locale                (void);
71
72 /* Push and pop error handlers for X errors
73  */
74 void      gdk_error_trap_push           (void);
75 gint      gdk_error_trap_pop            (void);
76
77
78 void      gdk_set_use_xshm              (gboolean        use_xshm);
79
80 gboolean  gdk_get_use_xshm              (void);
81 gchar*    gdk_get_display               (void);
82
83 #ifndef GDK_DISABLE_DEPRECATED
84 gint gdk_input_add_full   (gint              source,
85                            GdkInputCondition condition,
86                            GdkInputFunction  function,
87                            gpointer          data,
88                            GdkDestroyNotify  destroy);
89 gint gdk_input_add        (gint              source,
90                            GdkInputCondition condition,
91                            GdkInputFunction  function,
92                            gpointer          data);
93 void gdk_input_remove     (gint              tag);
94 #endif /* GDK_DISABLE_DEPRECATED */
95
96 GdkGrabStatus gdk_pointer_grab       (GdkWindow    *window,
97                                       gboolean      owner_events,
98                                       GdkEventMask  event_mask,
99                                       GdkWindow    *confine_to,
100                                       GdkCursor    *cursor,
101                                       guint32       time);
102 void          gdk_pointer_ungrab     (guint32       time);
103 GdkGrabStatus gdk_keyboard_grab      (GdkWindow    *window,
104                                       gboolean      owner_events,
105                                       guint32       time);
106 void          gdk_keyboard_ungrab    (guint32       time);
107 gboolean      gdk_pointer_is_grabbed (void);
108
109 gint gdk_screen_width  (void) G_GNUC_CONST;
110 gint gdk_screen_height (void) G_GNUC_CONST;
111
112 gint gdk_screen_width_mm  (void) G_GNUC_CONST;
113 gint gdk_screen_height_mm (void) G_GNUC_CONST;
114
115 void gdk_flush (void);
116 void gdk_beep (void);
117
118 void gdk_set_double_click_time (guint msec);
119
120 /* Rectangle utilities
121  */
122 gboolean gdk_rectangle_intersect (GdkRectangle *src1,
123                                   GdkRectangle *src2,
124                                   GdkRectangle *dest);
125 void     gdk_rectangle_union     (GdkRectangle *src1,
126                                   GdkRectangle *src2,
127                                   GdkRectangle *dest);
128
129 GType gdk_rectangle_get_type (void);
130
131 #define GDK_TYPE_RECTANGLE (gdk_rectangle_get_type ())
132
133 /* Conversion functions between wide char and multibyte strings. 
134  */
135 gchar     *gdk_wcstombs          (const GdkWChar   *src);
136 gint       gdk_mbstowcs          (GdkWChar         *dest,
137                                   const gchar      *src,
138                                   gint              dest_max);
139
140 /* Miscellaneous */
141 void     gdk_event_send_clientmessage_toall (GdkEvent    *event);
142 gboolean gdk_event_send_client_message (GdkEvent    *event,
143                                         guint32      xid);
144
145 /* Threading
146  */
147
148 GDKVAR GMutex *gdk_threads_mutex;
149
150 void     gdk_threads_enter                (void);
151 void     gdk_threads_leave                (void);
152
153 #ifdef  G_THREADS_ENABLED
154 #  define GDK_THREADS_ENTER()   G_STMT_START {  \
155       if (gdk_threads_mutex)                    \
156         g_mutex_lock (gdk_threads_mutex);       \
157    } G_STMT_END
158 #  define GDK_THREADS_LEAVE()   G_STMT_START {  \
159       if (gdk_threads_mutex)                    \
160         g_mutex_unlock (gdk_threads_mutex);     \
161    } G_STMT_END
162 #else   /* !G_THREADS_ENABLED */
163 #  define GDK_THREADS_ENTER()
164 #  define GDK_THREADS_LEAVE()
165 #endif  /* !G_THREADS_ENABLED */
166
167 #ifdef __cplusplus
168 }
169 #endif /* __cplusplus */
170
171
172 #endif /* __GDK_H__ */