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