]> Pileus Git - ~andy/gtk/blob - gdk/gdk.h
Remove all references to offscreen flag which was no longer used.
[~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 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.
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  * Library General Public License for more details.
13  *
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.
18  */
19
20 /*
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/. 
25  */
26
27 #ifndef __GDK_H__
28 #define __GDK_H__
29
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/gdkpixmap.h>
43 #include <gdk/gdkproperty.h>
44 #include <gdk/gdkregion.h>
45 #include <gdk/gdkrgb.h>
46 #include <gdk/gdkselection.h>
47 #include <gdk/gdktypes.h>
48 #include <gdk/gdkvisual.h>
49 #include <gdk/gdkwindow.h>
50
51 #include <gdk/gdkcompat.h>
52
53 #ifdef __cplusplus
54 extern "C" {
55 #endif /* __cplusplus */
56
57
58 /* Initialization, exit and events
59  */
60 #define   GDK_PRIORITY_EVENTS           (G_PRIORITY_DEFAULT)
61 void      gdk_init                      (gint           *argc,
62                                          gchar        ***argv);
63 gboolean  gdk_init_check                (gint           *argc,
64                                          gchar        ***argv);
65 void      gdk_exit                      (gint            error_code);
66 gchar*    gdk_set_locale                (void);
67
68 /* Push and pop error handlers for X errors
69  */
70 void      gdk_error_trap_push           (void);
71 gint      gdk_error_trap_pop            (void);
72
73
74 void      gdk_set_use_xshm              (gboolean        use_xshm);
75
76 gboolean  gdk_get_use_xshm              (void);
77 gchar*    gdk_get_display               (void);
78
79 gint gdk_input_add_full   (gint              source,
80                            GdkInputCondition condition,
81                            GdkInputFunction  function,
82                            gpointer          data,
83                            GdkDestroyNotify  destroy);
84 gint gdk_input_add        (gint              source,
85                            GdkInputCondition condition,
86                            GdkInputFunction  function,
87                            gpointer          data);
88 void gdk_input_remove     (gint              tag);
89
90 gint     gdk_pointer_grab       (GdkWindow    *window,
91                                  gboolean      owner_events,
92                                  GdkEventMask  event_mask,
93                                  GdkWindow    *confine_to,
94                                  GdkCursor    *cursor,
95                                  guint32       time);
96 void     gdk_pointer_ungrab     (guint32       time);
97 gint     gdk_keyboard_grab      (GdkWindow    *window,
98                                  gboolean      owner_events,
99                                  guint32       time);
100 void     gdk_keyboard_ungrab    (guint32       time);
101 gboolean gdk_pointer_is_grabbed (void);
102
103 gint gdk_screen_width  (void);
104 gint gdk_screen_height (void);
105
106 gint gdk_screen_width_mm  (void);
107 gint gdk_screen_height_mm (void);
108
109 void gdk_flush (void);
110 void gdk_beep (void);
111
112 void gdk_key_repeat_disable (void);
113 void gdk_key_repeat_restore (void);
114
115 /* Rectangle utilities
116  */
117 gboolean gdk_rectangle_intersect (GdkRectangle *src1,
118                                   GdkRectangle *src2,
119                                   GdkRectangle *dest);
120 void     gdk_rectangle_union     (GdkRectangle *src1,
121                                   GdkRectangle *src2,
122                                   GdkRectangle *dest);
123
124 /* Conversion functions between wide char and multibyte strings. 
125  */
126 gchar     *gdk_wcstombs          (const GdkWChar   *src);
127 gint       gdk_mbstowcs          (GdkWChar         *dest,
128                                   const gchar      *src,
129                                   gint              dest_max);
130
131 /* Miscellaneous */
132 void     gdk_event_send_clientmessage_toall (GdkEvent    *event);
133 gboolean gdk_event_send_client_message (GdkEvent    *event,
134                                         guint32      xid);
135
136 /* Key values
137  */
138 gchar*   gdk_keyval_name         (guint        keyval);
139 guint    gdk_keyval_from_name    (const gchar *keyval_name);
140 void     gdk_keyval_convert_case (guint        symbol,
141                                   guint       *lower,
142                                   guint       *upper);
143 guint    gdk_keyval_to_upper     (guint        keyval);
144 guint    gdk_keyval_to_lower     (guint        keyval);
145 gboolean gdk_keyval_is_upper     (guint        keyval);
146 gboolean gdk_keyval_is_lower     (guint        keyval);
147
148 guint32  gdk_keyval_to_unicode   (guint        keyval);
149 guint    gdk_unicode_to_keyval   (guint32      wc);
150
151 /* Threading
152  */
153
154 GDKVAR GMutex *gdk_threads_mutex;
155
156 void     gdk_threads_enter                (void);
157 void     gdk_threads_leave                (void);
158
159 #ifdef  G_THREADS_ENABLED
160 #  define GDK_THREADS_ENTER()   G_STMT_START {  \
161       if (gdk_threads_mutex)                    \
162         g_mutex_lock (gdk_threads_mutex);       \
163    } G_STMT_END
164 #  define GDK_THREADS_LEAVE()   G_STMT_START {  \
165       if (gdk_threads_mutex)                    \
166         g_mutex_unlock (gdk_threads_mutex);     \
167    } G_STMT_END
168 #else   /* !G_THREADS_ENABLED */
169 #  define GDK_THREADS_ENTER()
170 #  define GDK_THREADS_LEAVE()
171 #endif  /* !G_THREADS_ENABLED */
172
173 #ifdef __cplusplus
174 }
175 #endif /* __cplusplus */
176
177
178 #endif /* __GDK_H__ */