~canonical-dx-team/ubuntu/maverick/gtk+2.0/menuproxy

« back to all changes in this revision

Viewing changes to gdk/gdkdrawable.h

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2007-05-04 12:24:25 UTC
  • mfrom: (1.1.21 upstream)
  • Revision ID: james.westby@ubuntu.com-20070504122425-0m8midgzrp40y8w2
Tags: 2.10.12-1ubuntu1
* Sync with Debian
* New upstream version:
  Fixed bugs:
  - 379414 file chooser warnings when changing path in the entry
  - 418585 GtkFileChooserDefault sizing code is not DPI independent
  - 419568 Crash in search if start with special letter
  - 435062 build dies with icon cache validation
  - 379399 Segfault to call gtk_print_operation_run twice.
  - 387889 cups backend has problems when there are too many printers
  - 418531 invalid read to gtkicontheme.c gtk_icon_theme_lookup_icon...
  - 423916 crash in color scheme code
  - 424042 Segmentation fault while quickly pressing Alt+arrows
  - 415260 Protect against negative indices when setting values in G...
  - 419171 XGetVisualInfo() may not set nxvisuals
  - 128852 Gdk cursors don't look good on win32
  - 344657 Ctrl-H doesn't toggle "Show Hidden Files" setting
  - 345345 PrintOperation::paginate is not emitted for class handler
  - 347567 GtkPrintOperation::end-print is not emitted if it's cance...
  - 369112 gtk_ui_manager_add_ui should accept unnamed separator
  - 392015 Selected menu item invisible on Windows Vista
  - 399253 MS-Windows Theme Bottom Tab placement rendering glitches
  - 399425 gtk_input_dialog_fill_axes() adds child to gtkscrolledwin...
  - 403251 [patch] little memory leak in GtkPrintJob
  - 403267 [patch] memory leak in GtkPageSetupUnixDialog
  - 403470 MS-Windows Theme tab placement other than on top leaks a ...
  - 404506 Windows system fonts that have multi-byte font names cann...
  - 405089 Incorrect window placement for GtkEventBox private window
  - 405515 Minor leak in gtkfilesystemmodel.c
  - 405539 gdk_pixbuf_save() for PNG saver can return FALSE without ...
  - 415681 gdk_window_clear_area includes an extra line and column o...
  - 418219 GtkRecentChooser should apply filter before sorting and c...
  - 418403 Scroll to printer after selecting it from settings
  - 421985 _gtk_print_operation_platform_backend_launch_preview
  - 421990 gtk_print_job_get_surface
  - 421993 gtk_print_operation_init
  - 423064 Conditional jump or move depends on uninitialised value(s...
  - 423722 Fix printing header in gtk-demo
  - 424168 gtk_print_operation_run on async preview
  - 425655 Don't install gtk+-unix-print-2.0.pc on non-UNIX platforms
  - 425786 GDK segfaults if XineramaQueryScreens fails
  - 428665 Lpr Backend gets stuck in infinite loop during gtk_enumer...
  - 429902 GtkPrintOperation leaks cairo contextes
  - 431997 First delay of GdkPixbufAnimationIter is wrong
  - 433242 Inconsistent scroll arrow position calculations
  - 433972 Placing gtk.Expander inside a gtk.TextView() changes gtk....
  - 434261 _gtk_toolbar_elide_underscores incorrectly handles some s...
  - 383354 ctrl-L should make 'Location' entry disappear
  - 418673 gtk_recent_manager_add_item
  - 429732 gtk_accel_group_finalize accesses invalid memory
  - 435028 WM_CLIENT_LEADER is wrong on the leader_window
  - 431067 Background of the header window is not updated
  - 338843 add recent files support inside the ui manager
  - 148535 add drop shadow to menus, tooltips, etc. under Windows XP
* debian/control.in:
  - Conflicts on ubuntulooks (<= 0.9.11-1)
* debian/patches/15_default-fallback-icon-theme.patch:
  - patch from Debian, fallback on gnome icon theme

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 Lesser 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
 * Lesser General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU Lesser General Public
 
15
 * License along with this library; if not, write to the
 
16
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
17
 * Boston, MA 02111-1307, USA.
 
18
 */
 
19
 
 
20
/*
 
21
 * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
 
22
 * file for a list of people on the GTK+ Team.  See the ChangeLog
 
23
 * files for a list of changes.  These files are distributed with
 
24
 * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
 
25
 */
 
26
#ifndef __GDK_DRAWABLE_H__
 
27
#define __GDK_DRAWABLE_H__
 
28
 
 
29
#include <gdk/gdktypes.h>
 
30
#include <gdk/gdkgc.h>
 
31
#include <gdk/gdkrgb.h>
 
32
#include <gdk-pixbuf/gdk-pixbuf.h>
 
33
 
 
34
#include <cairo.h>
 
35
 
 
36
G_BEGIN_DECLS
 
37
 
 
38
typedef struct _GdkDrawableClass GdkDrawableClass;
 
39
typedef struct _GdkTrapezoid     GdkTrapezoid;
 
40
 
 
41
#define GDK_TYPE_DRAWABLE              (gdk_drawable_get_type ())
 
42
#define GDK_DRAWABLE(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_DRAWABLE, GdkDrawable))
 
43
#define GDK_DRAWABLE_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_DRAWABLE, GdkDrawableClass))
 
44
#define GDK_IS_DRAWABLE(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_DRAWABLE))
 
45
#define GDK_IS_DRAWABLE_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_DRAWABLE))
 
46
#define GDK_DRAWABLE_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_DRAWABLE, GdkDrawableClass))
 
47
 
 
48
struct _GdkDrawable
 
49
{
 
50
  GObject parent_instance;
 
51
};
 
52
 
 
53
struct _GdkDrawableClass 
 
54
{
 
55
  GObjectClass parent_class;
 
56
  
 
57
  GdkGC *(*create_gc)    (GdkDrawable    *drawable,
 
58
                          GdkGCValues    *values,
 
59
                          GdkGCValuesMask mask);
 
60
  void (*draw_rectangle) (GdkDrawable  *drawable,
 
61
                          GdkGC        *gc,
 
62
                          gboolean      filled,
 
63
                          gint          x,
 
64
                          gint          y,
 
65
                          gint          width,
 
66
                          gint          height);
 
67
  void (*draw_arc)       (GdkDrawable  *drawable,
 
68
                          GdkGC        *gc,
 
69
                          gboolean      filled,
 
70
                          gint          x,
 
71
                          gint          y,
 
72
                          gint          width,
 
73
                          gint          height,
 
74
                          gint          angle1,
 
75
                          gint          angle2);
 
76
  void (*draw_polygon)   (GdkDrawable  *drawable,
 
77
                          GdkGC        *gc,
 
78
                          gboolean      filled,
 
79
                          GdkPoint     *points,
 
80
                          gint          npoints);
 
81
  void (*draw_text)      (GdkDrawable  *drawable,
 
82
                          GdkFont      *font,
 
83
                          GdkGC        *gc,
 
84
                          gint          x,
 
85
                          gint          y,
 
86
                          const gchar  *text,
 
87
                          gint          text_length);
 
88
  void (*draw_text_wc)   (GdkDrawable    *drawable,
 
89
                          GdkFont        *font,
 
90
                          GdkGC          *gc,
 
91
                          gint            x,
 
92
                          gint            y,
 
93
                          const GdkWChar *text,
 
94
                          gint            text_length);
 
95
  void (*draw_drawable)  (GdkDrawable  *drawable,
 
96
                          GdkGC        *gc,
 
97
                          GdkDrawable  *src,
 
98
                          gint          xsrc,
 
99
                          gint          ysrc,
 
100
                          gint          xdest,
 
101
                          gint          ydest,
 
102
                          gint          width,
 
103
                          gint          height);
 
104
  void (*draw_points)    (GdkDrawable  *drawable,
 
105
                          GdkGC        *gc,
 
106
                          GdkPoint     *points,
 
107
                          gint          npoints);
 
108
  void (*draw_segments)  (GdkDrawable  *drawable,
 
109
                          GdkGC        *gc,
 
110
                          GdkSegment   *segs,
 
111
                          gint          nsegs);
 
112
 void (*draw_lines)     (GdkDrawable  *drawable,
 
113
                          GdkGC        *gc,
 
114
                          GdkPoint     *points,
 
115
                          gint          npoints);
 
116
 
 
117
  void (*draw_glyphs)    (GdkDrawable      *drawable,
 
118
                          GdkGC            *gc,
 
119
                          PangoFont        *font,
 
120
                          gint              x,
 
121
                          gint              y,
 
122
                          PangoGlyphString *glyphs);
 
123
 
 
124
  void (*draw_image)     (GdkDrawable *drawable,
 
125
                          GdkGC       *gc,
 
126
                          GdkImage    *image,
 
127
                          gint         xsrc,
 
128
                          gint         ysrc,
 
129
                          gint         xdest,
 
130
                          gint         ydest,
 
131
                          gint         width,
 
132
                          gint         height);
 
133
  
 
134
  gint (*get_depth)      (GdkDrawable  *drawable);
 
135
  void (*get_size)       (GdkDrawable  *drawable,
 
136
                          gint         *width,
 
137
                          gint         *height);
 
138
 
 
139
  void (*set_colormap)   (GdkDrawable  *drawable,
 
140
                          GdkColormap  *cmap);
 
141
 
 
142
  GdkColormap* (*get_colormap)  (GdkDrawable  *drawable);
 
143
  GdkVisual*   (*get_visual)    (GdkDrawable  *drawable);
 
144
  GdkScreen*   (*get_screen)    (GdkDrawable  *drawable);
 
145
 
 
146
  GdkImage*    (*get_image)  (GdkDrawable  *drawable,
 
147
                              gint          x,
 
148
                              gint          y,
 
149
                              gint          width,
 
150
                              gint          height);
 
151
 
 
152
  GdkRegion*   (*get_clip_region)    (GdkDrawable  *drawable);
 
153
  GdkRegion*   (*get_visible_region) (GdkDrawable  *drawable);
 
154
 
 
155
  GdkDrawable* (*get_composite_drawable) (GdkDrawable *drawable,
 
156
                                          gint         x,
 
157
                                          gint         y,
 
158
                                          gint         width,
 
159
                                          gint         height,
 
160
                                          gint        *composite_x_offset,
 
161
                                          gint        *composite_y_offset);
 
162
 
 
163
  void         (*draw_pixbuf) (GdkDrawable *drawable,
 
164
                               GdkGC       *gc,
 
165
                               GdkPixbuf   *pixbuf,
 
166
                               gint         src_x,
 
167
                               gint         src_y,
 
168
                               gint         dest_x,
 
169
                               gint         dest_y,
 
170
                               gint         width,
 
171
                               gint         height,
 
172
                               GdkRgbDither dither,
 
173
                               gint         x_dither,
 
174
                               gint         y_dither);
 
175
  GdkImage*    (*_copy_to_image) (GdkDrawable    *drawable,
 
176
                                  GdkImage       *image,
 
177
                                  gint            src_x,
 
178
                                  gint            src_y,
 
179
                                  gint            dest_x,
 
180
                                  gint            dest_y,
 
181
                                  gint            width,
 
182
                                  gint            height);
 
183
  
 
184
  void (*draw_glyphs_transformed) (GdkDrawable      *drawable,
 
185
                                   GdkGC            *gc,
 
186
                                   PangoMatrix      *matrix,
 
187
                                   PangoFont        *font,
 
188
                                   gint              x,
 
189
                                   gint              y,
 
190
                                   PangoGlyphString *glyphs);
 
191
  void (*draw_trapezoids)         (GdkDrawable      *drawable,
 
192
                                   GdkGC            *gc,
 
193
                                   GdkTrapezoid     *trapezoids,
 
194
                                   gint              n_trapezoids);
 
195
 
 
196
  cairo_surface_t *(*ref_cairo_surface) (GdkDrawable *drawable);
 
197
 
 
198
  /* Padding for future expansion */
 
199
  void         (*_gdk_reserved4)  (void);
 
200
  void         (*_gdk_reserved5)  (void);
 
201
  void         (*_gdk_reserved6)  (void);
 
202
  void         (*_gdk_reserved7)  (void);
 
203
  void         (*_gdk_reserved9)  (void);
 
204
  void         (*_gdk_reserved10) (void);
 
205
  void         (*_gdk_reserved11) (void);
 
206
  void         (*_gdk_reserved12) (void);
 
207
  void         (*_gdk_reserved13) (void);
 
208
  void         (*_gdk_reserved14) (void);
 
209
  void         (*_gdk_reserved15) (void);
 
210
  void         (*_gdk_reserved16) (void);
 
211
};
 
212
 
 
213
struct _GdkTrapezoid
 
214
{
 
215
  double y1, x11, x21, y2, x12, x22;
 
216
};
 
217
 
 
218
GType           gdk_drawable_get_type     (void) G_GNUC_CONST;
 
219
 
 
220
/* Manipulation of drawables
 
221
 */
 
222
 
 
223
#ifndef GDK_DISABLE_DEPRECATED
 
224
void            gdk_drawable_set_data     (GdkDrawable    *drawable,
 
225
                                           const gchar    *key,
 
226
                                           gpointer       data,
 
227
                                           GDestroyNotify  destroy_func);
 
228
gpointer        gdk_drawable_get_data     (GdkDrawable    *drawable,
 
229
                                           const gchar    *key);
 
230
#endif /* GDK_DISABLE_DEPRECATED */
 
231
 
 
232
void            gdk_drawable_get_size     (GdkDrawable    *drawable,
 
233
                                           gint           *width,
 
234
                                           gint           *height);
 
235
void            gdk_drawable_set_colormap (GdkDrawable    *drawable,
 
236
                                           GdkColormap    *colormap);
 
237
GdkColormap*    gdk_drawable_get_colormap (GdkDrawable    *drawable);
 
238
GdkVisual*      gdk_drawable_get_visual   (GdkDrawable    *drawable);
 
239
gint            gdk_drawable_get_depth    (GdkDrawable    *drawable);
 
240
GdkScreen*      gdk_drawable_get_screen   (GdkDrawable    *drawable);
 
241
GdkDisplay*     gdk_drawable_get_display  (GdkDrawable    *drawable);
 
242
 
 
243
#ifndef GDK_DISABLE_DEPRECATED
 
244
GdkDrawable*    gdk_drawable_ref          (GdkDrawable    *drawable);
 
245
void            gdk_drawable_unref        (GdkDrawable    *drawable);
 
246
#endif /* GDK_DISABLE_DEPRECATED */
 
247
 
 
248
/* Drawing
 
249
 */
 
250
void gdk_draw_point     (GdkDrawable      *drawable,
 
251
                         GdkGC            *gc,
 
252
                         gint              x,
 
253
                         gint              y);
 
254
void gdk_draw_line      (GdkDrawable      *drawable,
 
255
                         GdkGC            *gc,
 
256
                         gint              x1_,
 
257
                         gint              y1_,
 
258
                         gint              x2_,
 
259
                         gint              y2_);
 
260
void gdk_draw_rectangle (GdkDrawable      *drawable,
 
261
                         GdkGC            *gc,
 
262
                         gboolean          filled,
 
263
                         gint              x,
 
264
                         gint              y,
 
265
                         gint              width,
 
266
                         gint              height);
 
267
void gdk_draw_arc       (GdkDrawable      *drawable,
 
268
                         GdkGC            *gc,
 
269
                         gboolean          filled,
 
270
                         gint              x,
 
271
                         gint              y,
 
272
                         gint              width,
 
273
                         gint              height,
 
274
                         gint              angle1,
 
275
                         gint              angle2);
 
276
void gdk_draw_polygon   (GdkDrawable      *drawable,
 
277
                         GdkGC            *gc,
 
278
                         gboolean          filled,
 
279
                         GdkPoint         *points,
 
280
                         gint              npoints);
 
281
#if !defined (GDK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION)
 
282
/* Used by gtk_default_draw_string () */
 
283
void gdk_draw_string    (GdkDrawable      *drawable,
 
284
                         GdkFont          *font,
 
285
                         GdkGC            *gc,
 
286
                         gint              x,
 
287
                         gint              y,
 
288
                         const gchar      *string);
 
289
#endif /* !GDK_DISABLE_DEPRECATED || GTK_COMPILATION */
 
290
#if !defined (GDK_DISABLE_DEPRECATED) || defined (GDK_COMPILATION)
 
291
/* Used by gdk_pixmap_draw_text (), gdk_window_draw_text() */
 
292
void gdk_draw_text      (GdkDrawable      *drawable,
 
293
                         GdkFont          *font,
 
294
                         GdkGC            *gc,
 
295
                         gint              x,
 
296
                         gint              y,
 
297
                         const gchar      *text,
 
298
                         gint              text_length);
 
299
/* Used by gdk_pixmap_draw_text_wc (), gdk_window_draw_text_wc () */
 
300
void gdk_draw_text_wc   (GdkDrawable      *drawable,
 
301
                         GdkFont          *font,
 
302
                         GdkGC            *gc,
 
303
                         gint              x,
 
304
                         gint              y,
 
305
                         const GdkWChar   *text,
 
306
                         gint              text_length);
 
307
#endif /* !GDK_DISABLE_DEPRECATED || GDK_COMPILATION */
 
308
void gdk_draw_drawable  (GdkDrawable      *drawable,
 
309
                         GdkGC            *gc,
 
310
                         GdkDrawable      *src,
 
311
                         gint              xsrc,
 
312
                         gint              ysrc,
 
313
                         gint              xdest,
 
314
                         gint              ydest,
 
315
                         gint              width,
 
316
                         gint              height);
 
317
void gdk_draw_image     (GdkDrawable      *drawable,
 
318
                         GdkGC            *gc,
 
319
                         GdkImage         *image,
 
320
                         gint              xsrc,
 
321
                         gint              ysrc,
 
322
                         gint              xdest,
 
323
                         gint              ydest,
 
324
                         gint              width,
 
325
                         gint              height);
 
326
void gdk_draw_points    (GdkDrawable      *drawable,
 
327
                         GdkGC            *gc,
 
328
                         GdkPoint         *points,
 
329
                         gint              npoints);
 
330
void gdk_draw_segments  (GdkDrawable      *drawable,
 
331
                         GdkGC            *gc,
 
332
                         GdkSegment       *segs,
 
333
                         gint              nsegs);
 
334
void gdk_draw_lines     (GdkDrawable      *drawable,
 
335
                         GdkGC            *gc,
 
336
                         GdkPoint         *points,
 
337
                         gint              npoints);
 
338
void gdk_draw_pixbuf    (GdkDrawable      *drawable,
 
339
                         GdkGC            *gc,
 
340
                         GdkPixbuf        *pixbuf,
 
341
                         gint              src_x,
 
342
                         gint              src_y,
 
343
                         gint              dest_x,
 
344
                         gint              dest_y,
 
345
                         gint              width,
 
346
                         gint              height,
 
347
                         GdkRgbDither      dither,
 
348
                         gint              x_dither,
 
349
                         gint              y_dither);
 
350
 
 
351
void gdk_draw_glyphs      (GdkDrawable      *drawable,
 
352
                           GdkGC            *gc,
 
353
                           PangoFont        *font,
 
354
                           gint              x,
 
355
                           gint              y,
 
356
                           PangoGlyphString *glyphs);
 
357
void gdk_draw_layout_line (GdkDrawable      *drawable,
 
358
                           GdkGC            *gc,
 
359
                           gint              x,
 
360
                           gint              y,
 
361
                           PangoLayoutLine  *line);
 
362
void gdk_draw_layout      (GdkDrawable      *drawable,
 
363
                           GdkGC            *gc,
 
364
                           gint              x,
 
365
                           gint              y,
 
366
                           PangoLayout      *layout);
 
367
 
 
368
void gdk_draw_layout_line_with_colors (GdkDrawable     *drawable,
 
369
                                       GdkGC           *gc,
 
370
                                       gint             x,
 
371
                                       gint             y,
 
372
                                       PangoLayoutLine *line,
 
373
                                       const GdkColor  *foreground,
 
374
                                       const GdkColor  *background);
 
375
void gdk_draw_layout_with_colors      (GdkDrawable     *drawable,
 
376
                                       GdkGC           *gc,
 
377
                                       gint             x,
 
378
                                       gint             y,
 
379
                                       PangoLayout     *layout,
 
380
                                       const GdkColor  *foreground,
 
381
                                       const GdkColor  *background);
 
382
 
 
383
void gdk_draw_glyphs_transformed (GdkDrawable      *drawable,
 
384
                                  GdkGC            *gc,
 
385
                                  PangoMatrix      *matrix,
 
386
                                  PangoFont        *font,
 
387
                                  gint              x,
 
388
                                  gint              y,
 
389
                                  PangoGlyphString *glyphs);
 
390
void gdk_draw_trapezoids         (GdkDrawable      *drawable,
 
391
                                  GdkGC            *gc,
 
392
                                  GdkTrapezoid     *trapezoids,
 
393
                                  gint              n_trapezoids);
 
394
 
 
395
#ifndef GDK_DISABLE_DEPRECATED
 
396
#define gdk_draw_pixmap                gdk_draw_drawable
 
397
#define gdk_draw_bitmap                gdk_draw_drawable
 
398
#endif /* GDK_DISABLE_DEPRECATED */
 
399
 
 
400
GdkImage* gdk_drawable_get_image      (GdkDrawable *drawable,
 
401
                                       gint         x,
 
402
                                       gint         y,
 
403
                                       gint         width,
 
404
                                       gint         height);
 
405
GdkImage *gdk_drawable_copy_to_image (GdkDrawable  *drawable,
 
406
                                      GdkImage     *image,
 
407
                                      gint          src_x,
 
408
                                      gint          src_y,
 
409
                                      gint          dest_x,
 
410
                                      gint          dest_y,
 
411
                                      gint          width,
 
412
                                      gint          height);
 
413
 
 
414
GdkRegion *gdk_drawable_get_clip_region    (GdkDrawable *drawable);
 
415
GdkRegion *gdk_drawable_get_visible_region (GdkDrawable *drawable);
 
416
 
 
417
G_END_DECLS
 
418
 
 
419
#endif /* __GDK_DRAWABLE_H__ */