]> Pileus Git - ~andy/gtk/blob - gdk/gdk.h
New function to reset the RC styles for a heirarchy
[~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 #ifndef __GDK_H__
20 #define __GDK_H__
21
22
23 #include <gdk/gdktypes.h>
24
25
26 #ifdef __cplusplus
27 extern "C" {
28 #endif /* __cplusplus */
29
30
31 /* Initialization, exit and events
32  */
33 void   gdk_init            (int    *argc,
34                             char ***argv);
35 void   gdk_exit            (int     error_code);
36 gchar* gdk_set_locale      (void);
37
38 gint gdk_events_pending  (void);
39 GdkEvent *gdk_event_get  (void);
40 GdkEvent *gdk_event_get_graphics_expose (GdkWindow *window);
41 void gdk_event_put       (GdkEvent     *event);
42
43 GdkEvent *gdk_event_copy (GdkEvent *event);
44 void      gdk_event_free (GdkEvent *event);
45
46 void gdk_set_show_events (gint  show_events);
47 void gdk_set_use_xshm    (gint  use_xshm);
48
49 gint gdk_get_show_events (void);
50 gint gdk_get_use_xshm    (void);
51 gchar *gdk_get_display (void);
52
53 guint32 gdk_time_get      (void);
54 guint32 gdk_timer_get     (void);
55 void    gdk_timer_set     (guint32 milliseconds);
56 void    gdk_timer_enable  (void);
57 void    gdk_timer_disable (void);
58
59 gint gdk_input_add_full   (gint              source,
60                            GdkInputCondition condition,
61                            GdkInputFunction  function,
62                            gpointer          data,
63                            GdkDestroyNotify  destroy);
64 #define gdk_input_add_interp gdk_input_add_full  
65 gint gdk_input_add        (gint              source,
66                            GdkInputCondition condition,
67                            GdkInputFunction  function,
68                            gpointer          data);
69 void gdk_input_remove     (gint              tag);
70
71 gint gdk_pointer_grab   (GdkWindow *     window,
72                          gint            owner_events,
73                          GdkEventMask    event_mask,
74                          GdkWindow *     confine_to,
75                          GdkCursor *     cursor,
76                          guint32         time);
77 void gdk_pointer_ungrab (guint32         time);
78
79 gint gdk_keyboard_grab   (GdkWindow *     window,
80                           gint            owner_events,
81                           guint32         time);
82 void gdk_keyboard_ungrab (guint32         time);
83
84 gint gdk_pointer_is_grabbed (void);
85
86 gint gdk_screen_width  (void);
87 gint gdk_screen_height (void);
88
89 void gdk_flush (void);
90 void gdk_beep (void);
91
92 void gdk_key_repeat_disable (void);
93 void gdk_key_repeat_restore (void);
94
95
96 /* Visuals
97  */
98 gint          gdk_visual_get_best_depth      (void);
99 GdkVisualType gdk_visual_get_best_type       (void);
100 GdkVisual*    gdk_visual_get_system          (void);
101 GdkVisual*    gdk_visual_get_best            (void);
102 GdkVisual*    gdk_visual_get_best_with_depth (gint           depth);
103 GdkVisual*    gdk_visual_get_best_with_type  (GdkVisualType  visual_type);
104 GdkVisual*    gdk_visual_get_best_with_both  (gint           depth,
105                                               GdkVisualType  visual_type);
106
107 /* Actually, these are no-ops... */
108 GdkVisual* gdk_visual_ref (GdkVisual *visual);
109 void       gdk_visual_unref (GdkVisual *visual);
110
111 void gdk_query_depths       (gint           **depths,
112                              gint            *count);
113 void gdk_query_visual_types (GdkVisualType  **visual_types,
114                              gint            *count);
115
116 GList* gdk_list_visuals (void);
117
118
119 /* Windows
120  */
121 GdkWindow*    gdk_window_new         (GdkWindow     *parent,
122                                       GdkWindowAttr *attributes,
123                                       gint           attributes_mask);
124
125 GdkWindow *   gdk_window_foreign_new (guint32        anid);
126 void          gdk_window_destroy     (GdkWindow     *window);
127 GdkWindow*    gdk_window_ref         (GdkWindow     *window);
128 void          gdk_window_unref       (GdkWindow     *window);
129
130 void          gdk_window_show        (GdkWindow    *window);
131 void          gdk_window_hide        (GdkWindow    *window);
132 void          gdk_window_withdraw    (GdkWindow    *window);
133 void          gdk_window_move        (GdkWindow    *window,
134                                       gint          x,
135                                       gint          y);
136 void          gdk_window_resize      (GdkWindow    *window,
137                                       gint          width,
138                                       gint          height);
139 void          gdk_window_move_resize (GdkWindow    *window,
140                                       gint          x,
141                                       gint          y,
142                                       gint          width,
143                                       gint          height);
144 void          gdk_window_reparent    (GdkWindow    *window,
145                                       GdkWindow    *new_parent,
146                                       gint          x,
147                                       gint          y);
148 void          gdk_window_clear       (GdkWindow    *window);
149 void          gdk_window_clear_area  (GdkWindow    *window,
150                                       gint          x,
151                                       gint          y,
152                                       gint          width,
153                                       gint          height);
154 void          gdk_window_clear_area_e(GdkWindow    *window,
155                                       gint          x,
156                                       gint          y,
157                                       gint          width,
158                                       gint          height);
159 void          gdk_window_copy_area   (GdkWindow    *window,
160                                       GdkGC        *gc,
161                                       gint          x,
162                                       gint          y,
163                                       GdkWindow    *source_window,
164                                       gint          source_x,
165                                       gint          source_y,
166                                       gint          width,
167                                       gint          height);
168 void          gdk_window_raise       (GdkWindow    *window);
169 void          gdk_window_lower       (GdkWindow    *window);
170
171 void          gdk_window_set_user_data   (GdkWindow       *window,
172                                           gpointer         user_data);
173 void          gdk_window_set_override_redirect(GdkWindow  *window,
174                                                gboolean override_redirect);
175
176 void          gdk_window_add_filter     (GdkWindow     *window,
177                                          GdkFilterFunc  function,
178                                          gpointer       data);
179 void          gdk_window_remove_filter  (GdkWindow     *window,
180                                          GdkFilterFunc  function,
181                                          gpointer       data);
182
183 /* 
184  * This allows for making shaped (partially transparent) windows
185  * - cool feature, needed for Drag and Drag for example.
186  *  The shape_mask can be the mask
187  *  from gdk_pixmap_create_from_xpm.   Stefan Wille
188  */
189 void gdk_window_shape_combine_mask (GdkWindow       *window,
190                                     GdkBitmap       *shape_mask,
191                                     gint             offset_x,
192                                     gint             offset_y);
193
194 /* 
195  * Drag & Drop
196  * Algorithm (drop source):
197  * A window being dragged will be sent a GDK_DRAG_BEGIN message.
198  * It will then do gdk_dnd_drag_addwindow() for any other windows that are to be
199  * dragged.
200  * When we get a DROP_ENTER incoming, we send it on to the window in question.
201  * That window needs to use gdk_dnd_drop_enter_reply() to indicate the state of
202  * things (it must call that even if it's not going to accept the drop)
203  *
204  * These two turn on/off drag or drop, and if enabling it also
205  * sets the list of types supported. The list of types passed in
206  * should be in order of decreasing preference.
207  */
208 void gdk_window_dnd_drag_set (GdkWindow  *window,
209                               guint8      drag_enable,
210                               gchar     **typelist,
211                               guint       numtypes);
212
213 /* 
214  *XXX todo: add a GDK_DROP_ENTER which can look at actual data
215  */
216 void gdk_window_dnd_drop_set (GdkWindow  *window,
217                               guint8      drop_enable,
218                               gchar     **typelist,
219                               guint       numtypes,
220                               guint8      destructive_op);
221
222 /* 
223  * This is used by the GDK_DRAG_BEGIN handler. An example of usage would be a
224  * file manager where multiple icons were selected and the drag began.
225  * The icon that the drag actually began on would gdk_dnd_drag_addwindow
226  * for all the other icons that were being dragged... 
227  */
228 void gdk_dnd_drag_addwindow  (GdkWindow  *window);
229 void gdk_window_dnd_data_set (GdkWindow  *window,
230                               GdkEvent   *event,
231                               gpointer    data,
232                               gulong      data_numbytes);
233 void gdk_dnd_set_drag_cursors(GdkCursor *default_cursor,
234                               GdkCursor *goahead_cursor);
235 void gdk_dnd_set_drag_shape(GdkWindow *default_pixmapwin,
236                             GdkPoint *default_hotspot,
237                             GdkWindow *goahead_pixmapwin,
238                             GdkPoint *goahead_hotspot);
239
240 void          gdk_window_set_hints       (GdkWindow       *window,
241                                           gint             x,
242                                           gint             y,
243                                           gint             min_width,
244                                           gint             min_height,
245                                           gint             max_width,
246                                           gint             max_height,
247                                           gint             flags);
248 void          gdk_window_set_title       (GdkWindow       *window,
249                                           const gchar     *title);
250 void          gdk_window_set_background  (GdkWindow       *window,
251                                           GdkColor        *color);
252 void          gdk_window_set_back_pixmap (GdkWindow       *window,
253                                           GdkPixmap       *pixmap,
254                                           gint             parent_relative);
255 void          gdk_window_set_cursor      (GdkWindow       *window,
256                                           GdkCursor       *cursor);
257 void          gdk_window_set_colormap    (GdkWindow       *window,
258                                           GdkColormap     *colormap);
259 void          gdk_window_get_user_data   (GdkWindow       *window,
260                                           gpointer        *data);
261 void          gdk_window_get_geometry    (GdkWindow       *window,
262                                           gint            *x,
263                                           gint            *y,
264                                           gint            *width,
265                                           gint            *height,
266                                           gint            *depth);
267 void          gdk_window_get_position    (GdkWindow       *window,
268                                           gint            *x,
269                                           gint            *y);
270 void          gdk_window_get_size        (GdkWindow       *window,
271                                           gint            *width,
272                                           gint            *height);
273 GdkVisual*    gdk_window_get_visual      (GdkWindow       *window);
274 GdkColormap*  gdk_window_get_colormap    (GdkWindow       *window);
275 GdkWindowType gdk_window_get_type        (GdkWindow       *window);
276 gint          gdk_window_get_origin      (GdkWindow       *window,
277                                           gint            *x,
278                                           gint            *y);
279 GdkWindow*    gdk_window_get_pointer     (GdkWindow       *window,
280                                           gint            *x,
281                                           gint            *y,
282                                           GdkModifierType *mask);
283 GdkWindow*    gdk_window_get_parent      (GdkWindow       *window);
284 GdkWindow*    gdk_window_get_toplevel    (GdkWindow       *window);
285 GList*        gdk_window_get_children    (GdkWindow       *window);
286 GdkEventMask  gdk_window_get_events      (GdkWindow       *window);
287 void          gdk_window_set_events      (GdkWindow       *window,
288                                           GdkEventMask     event_mask);
289
290 void          gdk_window_set_icon        (GdkWindow       *window, 
291                                           GdkWindow       *icon_window,
292                                           GdkPixmap       *pixmap,
293                                           GdkBitmap       *mask);
294 void          gdk_window_set_icon_name   (GdkWindow       *window, 
295                                           gchar           *name);
296 void          gdk_window_set_group       (GdkWindow       *window, 
297                                           GdkWindow       *leader);
298 void          gdk_window_set_decorations (GdkWindow       *window,
299                                           GdkWMDecoration  decorations);
300 void          gdk_window_set_functions   (GdkWindow       *window,
301                                           GdkWMFunction    functions);
302 GList *       gdk_window_get_toplevels   (void);
303
304
305 /* Cursors
306  */
307 GdkCursor* gdk_cursor_new                (GdkCursorType   cursor_type);
308 GdkCursor* gdk_cursor_new_from_pixmap    (GdkPixmap       *source,
309                                           GdkPixmap       *mask,
310                                           GdkColor        *fg,
311                                           GdkColor        *bg,
312                                           gint             x,
313                                           gint             y);
314 void       gdk_cursor_destroy            (GdkCursor      *cursor);
315
316
317 /* GCs
318  */
319 GdkGC* gdk_gc_new                 (GdkWindow        *window);
320 GdkGC* gdk_gc_new_with_values     (GdkWindow        *window,
321                                    GdkGCValues      *values,
322                                    GdkGCValuesMask   values_mask);
323 GdkGC* gdk_gc_ref                 (GdkGC            *gc);
324 void   gdk_gc_unref               (GdkGC            *gc);
325 void   gdk_gc_destroy             (GdkGC            *gc);
326 void   gdk_gc_get_values          (GdkGC            *gc,
327                                    GdkGCValues      *values);
328 void   gdk_gc_set_foreground      (GdkGC            *gc,
329                                    GdkColor         *color);
330 void   gdk_gc_set_background      (GdkGC            *gc,
331                                    GdkColor         *color);
332 void   gdk_gc_set_font            (GdkGC            *gc,
333                                    GdkFont          *font);
334 void   gdk_gc_set_function        (GdkGC            *gc,
335                                    GdkFunction       function);
336 void   gdk_gc_set_fill            (GdkGC            *gc,
337                                    GdkFill           fill);
338 void   gdk_gc_set_tile            (GdkGC            *gc,
339                                    GdkPixmap        *tile);
340 void   gdk_gc_set_stipple         (GdkGC            *gc,
341                                    GdkPixmap        *stipple);
342 void   gdk_gc_set_ts_origin       (GdkGC            *gc,
343                                    gint              x,
344                                    gint              y);
345 void   gdk_gc_set_clip_origin     (GdkGC            *gc,
346                                    gint              x,
347                                    gint              y);
348 void   gdk_gc_set_clip_mask       (GdkGC            *gc,
349                                    GdkBitmap        *mask);
350 void   gdk_gc_set_clip_rectangle  (GdkGC            *gc,
351                                    GdkRectangle     *rectangle);
352 void   gdk_gc_set_clip_region     (GdkGC            *gc,
353                                    GdkRegion        *region);
354 void   gdk_gc_set_subwindow       (GdkGC            *gc,
355                                    GdkSubwindowMode  mode);
356 void   gdk_gc_set_exposures       (GdkGC            *gc,
357                                    gint              exposures);
358 void   gdk_gc_set_line_attributes (GdkGC            *gc,
359                                    gint              line_width,
360                                    GdkLineStyle      line_style,
361                                    GdkCapStyle       cap_style,
362                                    GdkJoinStyle      join_style);
363 void   gdk_gc_copy                (GdkGC             *dst_gc,
364                                    GdkGC             *src_gc);
365
366
367 /* Pixmaps
368  */
369 GdkPixmap* gdk_pixmap_new               (GdkWindow  *window,
370                                          gint        width,
371                                          gint        height,
372                                          gint        depth);
373 GdkBitmap* gdk_bitmap_create_from_data  (GdkWindow  *window,
374                                          gchar      *data,
375                                          gint        width,
376                                          gint        height);
377 GdkPixmap* gdk_pixmap_create_from_data  (GdkWindow  *window,
378                                          gchar      *data,
379                                          gint        width,
380                                          gint        height,
381                                          gint        depth,
382                                          GdkColor   *fg,
383                                          GdkColor   *bg);
384 GdkPixmap* gdk_pixmap_create_from_xpm   (GdkWindow  *window,
385                                          GdkBitmap **mask,
386                                          GdkColor   *transparent_color,
387                                          const gchar *filename);
388 GdkPixmap* gdk_pixmap_colormap_create_from_xpm 
389                                         (GdkWindow   *window,
390                                          GdkColormap *colormap,
391                                          GdkBitmap  **mask,
392                                          GdkColor    *transparent_color,
393                                          const gchar *filename);
394 GdkPixmap* gdk_pixmap_create_from_xpm_d (GdkWindow  *window,
395                                          GdkBitmap **mask,
396                                          GdkColor   *transparent_color,
397                                          gchar     **data);
398 GdkPixmap* gdk_pixmap_colormap_create_from_xpm_d 
399                                         (GdkWindow   *window,
400                                          GdkColormap *colormap,
401                                          GdkBitmap  **mask,
402                                          GdkColor    *transparent_color,
403                                          gchar     **data);
404 GdkPixmap *gdk_pixmap_ref               (GdkPixmap  *pixmap);
405 void       gdk_pixmap_unref             (GdkPixmap  *pixmap);
406
407 GdkBitmap *gdk_bitmap_ref               (GdkBitmap  *pixmap);
408 void       gdk_bitmap_unref             (GdkBitmap  *pixmap);
409
410
411 /* Images
412  */
413 GdkImage* gdk_image_new_bitmap(GdkVisual *,
414                                 gpointer,
415                                 gint,
416                                 gint);
417 GdkImage*  gdk_image_new       (GdkImageType  type,
418                                 GdkVisual    *visual,
419                                 gint          width,
420                                 gint          height);
421 GdkImage*  gdk_image_get       (GdkWindow    *window,
422                                 gint          x,
423                                 gint          y,
424                                 gint          width,
425                                 gint          height);
426 void       gdk_image_put_pixel (GdkImage     *image,
427                                 gint          x,
428                                 gint          y,
429                                 guint32       pixel);
430 guint32    gdk_image_get_pixel (GdkImage     *image,
431                                 gint          x,
432                                 gint          y);
433 void       gdk_image_destroy   (GdkImage     *image);
434
435
436 /* Color
437  */
438 GdkColormap* gdk_colormap_new     (GdkVisual   *visual,
439                                    gint         allocate);
440 GdkColormap* gdk_colormap_ref     (GdkColormap *cmap);
441 void         gdk_colormap_unref   (GdkColormap *cmap);
442
443 GdkColormap* gdk_colormap_get_system       (void);
444 gint         gdk_colormap_get_system_size  (void);
445
446 void gdk_colormap_change (GdkColormap   *colormap,
447                           gint           ncolors);
448 void gdk_colors_store    (GdkColormap   *colormap,
449                           GdkColor      *colors,
450                           gint           ncolors);
451 gint gdk_colors_alloc    (GdkColormap   *colormap,
452                           gint           contiguous,
453                           gulong        *planes,
454                           gint           nplanes,
455                           gulong        *pixels,
456                           gint           npixels);
457 void gdk_colors_free     (GdkColormap   *colormap,
458                           gulong        *pixels,
459                           gint           npixels,
460                           gulong         planes);
461 gint gdk_color_white     (GdkColormap   *colormap,
462                           GdkColor      *color);
463 gint gdk_color_black     (GdkColormap   *colormap,
464                           GdkColor      *color);
465 gint gdk_color_parse     (const gchar   *spec,
466                           GdkColor      *color);
467 gint gdk_color_alloc     (GdkColormap   *colormap,
468                           GdkColor      *color);
469 gint gdk_color_change    (GdkColormap   *colormap,
470                           GdkColor      *color);
471 gint gdk_color_equal     (GdkColor      *colora,
472                           GdkColor      *colorb);
473
474
475 /* Fonts
476  */
477 GdkFont* gdk_font_load      (const gchar    *font_name);
478 GdkFont* gdk_fontset_load   (gchar    *fontset_name);
479 GdkFont* gdk_font_ref       (GdkFont  *font);
480 void     gdk_font_unref     (GdkFont  *font);
481 gint     gdk_font_id        (GdkFont  *font);
482 gint     gdk_font_equal     (GdkFont  *fonta,
483                              GdkFont  *fontb);
484 gint     gdk_string_width   (GdkFont  *font,
485                              const gchar    *string);
486 gint     gdk_text_width     (GdkFont  *font,
487                              const gchar    *text,
488                              gint      text_length);
489 gint     gdk_char_width     (GdkFont  *font,
490                              gchar     character);
491 gint     gdk_string_measure (GdkFont  *font,
492                              const gchar    *string);
493 gint     gdk_text_measure   (GdkFont  *font,
494                              const gchar    *text,
495                              gint      text_length);
496 gint     gdk_char_measure   (GdkFont  *font,
497                              gchar     character);
498
499
500 /* Drawing
501  */
502 void gdk_draw_point      (GdkDrawable  *drawable,
503                           GdkGC        *gc,
504                           gint          x,
505                           gint          y);
506 void gdk_draw_line       (GdkDrawable  *drawable,
507                           GdkGC        *gc,
508                           gint          x1,
509                           gint          y1,
510                           gint          x2,
511                           gint          y2);
512 void gdk_draw_rectangle  (GdkDrawable  *drawable,
513                           GdkGC        *gc,
514                           gint          filled,
515                           gint          x,
516                           gint          y,
517                           gint          width,
518                           gint          height);
519 void gdk_draw_arc        (GdkDrawable  *drawable,
520                           GdkGC        *gc,
521                           gint          filled,
522                           gint          x,
523                           gint          y,
524                           gint          width,
525                           gint          height,
526                           gint          angle1,
527                           gint          angle2);
528 void gdk_draw_polygon    (GdkDrawable  *drawable,
529                           GdkGC        *gc,
530                           gint          filled,
531                           GdkPoint     *points,
532                           gint          npoints);
533 void gdk_draw_string     (GdkDrawable  *drawable,
534                           GdkFont      *font,
535                           GdkGC        *gc,
536                           gint          x,
537                           gint          y,
538                           const gchar        *string);
539 void gdk_draw_text       (GdkDrawable  *drawable,
540                           GdkFont      *font,
541                           GdkGC        *gc,
542                           gint          x,
543                           gint          y,
544                           const gchar        *text,
545                           gint          text_length);
546 void gdk_draw_pixmap     (GdkDrawable  *drawable,
547                           GdkGC        *gc,
548                           GdkDrawable  *src,
549                           gint          xsrc,
550                           gint          ysrc,
551                           gint          xdest,
552                           gint          ydest,
553                           gint          width,
554                           gint          height);
555 void gdk_draw_bitmap     (GdkDrawable  *drawable,
556                           GdkGC        *gc,
557                           GdkDrawable  *src,
558                           gint          xsrc,
559                           gint          ysrc,
560                           gint          xdest,
561                           gint          ydest,
562                           gint          width,
563                           gint          height);
564 void gdk_draw_image      (GdkDrawable  *drawable,
565                           GdkGC        *gc,
566                           GdkImage     *image,
567                           gint          xsrc,
568                           gint          ysrc,
569                           gint          xdest,
570                           gint          ydest,
571                           gint          width,
572                           gint          height);
573 void gdk_draw_points     (GdkDrawable  *drawable,
574                           GdkGC        *gc,
575                           GdkPoint     *points,
576                           gint          npoints);
577 void gdk_draw_segments   (GdkDrawable  *drawable,
578                           GdkGC        *gc,
579                           GdkSegment   *segs,
580                           gint          nsegs);
581 void gdk_draw_lines      (GdkDrawable  *drawable,
582                           GdkGC        *gc,
583                           GdkPoint     *points,
584                           gint          npoints);
585  
586
587
588
589 /* Selections
590  */
591 gint       gdk_selection_owner_set (GdkWindow    *owner,
592                                     GdkAtom       selection,
593                                     guint32       time,
594                                     gint          send_event);
595 GdkWindow* gdk_selection_owner_get (GdkAtom       selection);
596 void       gdk_selection_convert   (GdkWindow    *requestor,
597                                     GdkAtom       selection,
598                                     GdkAtom       target,
599                                     guint32       time);
600 gint       gdk_selection_property_get (GdkWindow  *requestor,
601                                        guchar    **data,
602                                        GdkAtom    *prop_type,
603                                        gint       *prop_format);
604 void       gdk_selection_send_notify (guint32       requestor,
605                                       GdkAtom       selection,
606                                       GdkAtom       target,
607                                       GdkAtom       property,
608                                       guint32       time);
609
610 gint       gdk_text_property_to_text_list (GdkAtom encoding, gint format,
611                                            guchar *text, gint length,
612                                            gchar ***list);
613 void       gdk_free_text_list             (gchar **list);
614 gint       gdk_string_to_compound_text    (gchar *str,
615                                            GdkAtom *encoding, gint *format,
616                                            guchar **ctext, gint *length);
617 void       gdk_free_compound_text         (guchar *ctext);
618
619 /* Properties
620  */
621 GdkAtom gdk_atom_intern     (const gchar *atom_name,
622                              gint         only_if_exists);
623 gchar*  gdk_atom_name       (GdkAtom atom);
624 gint    gdk_property_get    (GdkWindow   *window,
625                              GdkAtom      property,
626                              GdkAtom      type,
627                              gulong       offset,
628                              gulong       length,
629                              gint         pdelete,
630                              GdkAtom     *actual_property_type,
631                              gint        *actual_format,
632                              gint        *actual_length,
633                              guchar     **data);
634
635 void    gdk_property_change (GdkWindow   *window,
636                              GdkAtom      property,
637                              GdkAtom      type,
638                              gint         format,
639                              GdkPropMode  mode,
640                              guchar      *data,
641                              gint         nelements);
642 void    gdk_property_delete (GdkWindow   *window,
643                              GdkAtom      property);
644
645
646 /* Rectangle utilities
647  */
648 gint gdk_rectangle_intersect (GdkRectangle *src1,
649                               GdkRectangle *src2,
650                               GdkRectangle *dest);
651
652 /* XInput support
653  */
654
655 void gdk_input_init                         (void);
656 void gdk_input_exit                         (void);
657 GList *gdk_input_list_devices               (void);
658 void gdk_input_set_extension_events         (GdkWindow *window,
659                                              gint mask,
660                                              GdkExtensionMode mode);
661 void gdk_input_set_source                   (guint32 deviceid,
662                                              GdkInputSource source);
663 gint gdk_input_set_mode                     (guint32 deviceid,
664                                              GdkInputMode mode);
665 void gdk_input_set_axes                     (guint32 deviceid,
666                                              GdkAxisUse *axes);
667 void gdk_input_set_key                      (guint32 deviceid,
668                                              guint   index,
669                                              guint   keyval,
670                                              GdkModifierType modifiers);
671 void gdk_input_window_get_pointer     (GdkWindow       *window,
672                                        guint32         deviceid,
673                                        gdouble         *x,
674                                        gdouble         *y,
675                                        gdouble         *pressure,
676                                        gdouble         *xtilt,
677                                        gdouble         *ytilt,
678                                        GdkModifierType *mask);
679
680 GdkTimeCoord *gdk_input_motion_events (GdkWindow *window,
681                                        guint32 deviceid,
682                                        guint32 start,
683                                        guint32 stop,
684                                        gint *nevents_return);
685
686 /* International Input Method Support Functions
687  */
688
689 gint   gdk_im_ready             (void);
690
691 void   gdk_im_begin             (GdkIC ic, GdkWindow* window);
692 void   gdk_im_end               (void);
693 GdkIMStyle gdk_im_decide_style  (GdkIMStyle supported_style);
694 GdkIMStyle gdk_im_set_best_style (GdkIMStyle best_allowed_style);
695 GdkIC  gdk_ic_new               (GdkWindow* client_window,
696                                  GdkWindow* focus_window,
697                                  GdkIMStyle style, ...);
698 void   gdk_ic_destroy           (GdkIC ic);
699 GdkIMStyle   gdk_ic_get_style   (GdkIC ic);
700 void   gdk_ic_set_values        (GdkIC ic, ...);
701 void   gdk_ic_get_values        (GdkIC ic, ...);
702 void   gdk_ic_set_attr          (GdkIC ic, const char *target, ...);
703 void   gdk_ic_get_attr          (GdkIC ic, const char *target, ...);
704 GdkEventMask gdk_ic_get_events  (GdkIC ic);
705
706 /* Miscellaneous */
707 void gdk_event_send_clientmessage_toall(GdkEvent *event);
708
709 /* Color Context */
710
711 GdkColorContext *gdk_color_context_new                    (GdkVisual   *visual,
712                                                            GdkColormap *colormap);
713
714 GdkColorContext *gdk_color_context_new_mono               (GdkVisual   *visual,
715                                                            GdkColormap *colormap);
716
717 void             gdk_color_context_free                   (GdkColorContext *cc);
718
719 gulong           gdk_color_context_get_pixel              (GdkColorContext *cc,
720                                                            gushort          red,
721                                                            gushort          green,
722                                                            gushort          blue,
723                                                            gint            *failed);
724 void             gdk_color_context_get_pixels             (GdkColorContext *cc,
725                                                            gushort         *reds,
726                                                            gushort         *greens,
727                                                            gushort         *blues,
728                                                            gint             ncolors,
729                                                            gulong          *colors,
730                                                            gint            *nallocated);
731 void             gdk_color_context_get_pixels_incremental (GdkColorContext *cc,
732                                                            gushort         *reds,
733                                                            gushort         *greens,
734                                                            gushort         *blues,
735                                                            gint             ncolors,
736                                                            gint            *used,
737                                                            gulong          *colors,
738                                                            gint            *nallocated);
739
740 gint             gdk_color_context_query_color            (GdkColorContext *cc,
741                                                            GdkColor        *color);
742 gint             gdk_color_context_query_colors           (GdkColorContext *cc,
743                                                            GdkColor        *colors,
744                                                            gint             num_colors);
745
746 gint             gdk_color_context_add_palette            (GdkColorContext *cc,
747                                                            GdkColor        *palette,
748                                                            gint             num_palette);
749
750 void             gdk_color_context_init_dither            (GdkColorContext *cc);
751 void             gdk_color_context_free_dither            (GdkColorContext *cc);
752
753 gulong           gdk_color_context_get_pixel_from_palette (GdkColorContext *cc,
754                                                            gushort         *red,
755                                                            gushort         *green,
756                                                            gushort         *blue,
757                                                            gint            *failed);
758 guchar           gdk_color_context_get_index_from_palette (GdkColorContext *cc,
759                                                            gint            *red,
760                                                            gint            *green,
761                                                            gint            *blue,
762                                                            gint            *failed);
763 /* Regions
764  */
765
766 GdkRegion*     gdk_region_new       (void);
767 void           gdk_region_destroy   (GdkRegion     *region);
768
769 gboolean       gdk_region_empty     (GdkRegion     *region);
770 gboolean       gdk_region_equal     (GdkRegion     *region1,
771                                      GdkRegion     *region2);
772 gboolean       gdk_region_point_in  (GdkRegion     *region,
773                                      int                   x,
774                                      int                   y);
775 GdkOverlapType gdk_region_rect_in   (GdkRegion     *region,
776                                      GdkRectangle  *rect);
777
778 GdkRegion*     gdk_region_polygon   (GdkPoint      *points,
779                                      gint           npoints,
780                                      GdkFillRule    fill_rule);
781
782 void           gdk_region_offset   (GdkRegion      *region,
783                                     gint           dx,
784                                     gint           dy);
785 void           gdk_region_shrink   (GdkRegion      *region,
786                                     gint           dx,
787                                     gint           dy);
788
789 GdkRegion*    gdk_region_union_with_rect  (GdkRegion      *region,
790                                            GdkRectangle   *rect);
791 GdkRegion*    gdk_regions_intersect       (GdkRegion      *source1,
792                                            GdkRegion      *source2);
793 GdkRegion*    gdk_regions_union           (GdkRegion      *source1,
794                                            GdkRegion      *source2);
795 GdkRegion*    gdk_regions_subtract        (GdkRegion      *source1,
796                                            GdkRegion      *source2);
797 GdkRegion*    gdk_regions_xor             (GdkRegion      *source1,
798                                            GdkRegion      *source2);
799
800
801 #ifdef __cplusplus
802 }
803 #endif /* __cplusplus */
804
805
806 #endif /* __GDK_H__ */