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