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