Ardour  8.7-14-g57a6773833
gdkgc.h
Go to the documentation of this file.
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 
27 #ifndef __GDK_GC_H__
28 #define __GDK_GC_H__
29 
30 #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
31 #error "Only <gdk/gdk.h> can be included directly."
32 #endif
33 
34 #include <gdk/gdkcolor.h>
35 #include <gdk/gdktypes.h>
36 
37 G_BEGIN_DECLS
38 
39 typedef struct _GdkGCValues GdkGCValues;
40 typedef struct _GdkGCClass GdkGCClass;
41 
42 /* GC cap styles
43  * CapNotLast:
44  * CapButt:
45  * CapRound:
46  * CapProjecting:
47  */
48 typedef enum
49 {
55 
56 /* GC fill types.
57  * Solid:
58  * Tiled:
59  * Stippled:
60  * OpaqueStippled:
61  */
62 typedef enum
63 {
69 
70 /* GC function types.
71  * Copy: Overwrites destination pixels with the source pixels.
72  * Invert: Inverts the destination pixels.
73  * Xor: Xor's the destination pixels with the source pixels.
74  * Clear: set pixels to 0
75  * And: source AND destination
76  * And Reverse: source AND (NOT destination)
77  * And Invert: (NOT source) AND destination
78  * Noop: destination
79  * Or: source OR destination
80  * Nor: (NOT source) AND (NOT destination)
81  * Equiv: (NOT source) XOR destination
82  * Xor Reverse: source OR (NOT destination)
83  * Copy Inverted: NOT source
84  * Xor Inverted: (NOT source) OR destination
85  * Nand: (NOT source) OR (NOT destination)
86  * Set: set pixels to 1
87  */
88 typedef enum
89 {
105  GDK_SET
107 
108 /* GC join styles
109  * JoinMiter:
110  * JoinRound:
111  * JoinBevel:
112  */
113 typedef enum
114 {
119 
120 /* GC line styles
121  * Solid:
122  * OnOffDash:
123  * DoubleDash:
124  */
125 typedef enum
126 {
131 
132 typedef enum
133 {
137 
138 typedef enum
139 {
142  GDK_GC_FONT = 1 << 2,
143  GDK_GC_FUNCTION = 1 << 3,
144  GDK_GC_FILL = 1 << 4,
145  GDK_GC_TILE = 1 << 5,
146  GDK_GC_STIPPLE = 1 << 6,
153  GDK_GC_EXPOSURES = 1 << 13,
154  GDK_GC_LINE_WIDTH = 1 << 14,
155  GDK_GC_LINE_STYLE = 1 << 15,
156  GDK_GC_CAP_STYLE = 1 << 16,
157  GDK_GC_JOIN_STYLE = 1 << 17
159 
161 {
165  GdkFunction function;
180 };
181 
182 #define GDK_TYPE_GC (gdk_gc_get_type ())
183 #define GDK_GC(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_GC, GdkGC))
184 #define GDK_GC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_GC, GdkGCClass))
185 #define GDK_IS_GC(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_GC))
186 #define GDK_IS_GC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_GC))
187 #define GDK_GC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_GC, GdkGCClass))
188 
189 struct _GdkGC
190 {
192 
193  gint GSEAL (clip_x_origin);
194  gint GSEAL (clip_y_origin);
195  gint GSEAL (ts_x_origin);
196  gint GSEAL (ts_y_origin);
197 
198  GdkColormap *GSEAL (colormap);
199 };
200 
201 struct _GdkGCClass
202 {
203  GObjectClass parent_class;
204 
205  void (*get_values) (GdkGC *gc,
206  GdkGCValues *values);
207  void (*set_values) (GdkGC *gc,
208  GdkGCValues *values,
209  GdkGCValuesMask mask);
210  void (*set_dashes) (GdkGC *gc,
211  gint dash_offset,
212  gint8 dash_list[],
213  gint n);
214 
215  /* Padding for future expansion */
216  void (*_gdk_reserved1) (void);
217  void (*_gdk_reserved2) (void);
218  void (*_gdk_reserved3) (void);
219  void (*_gdk_reserved4) (void);
220 };
221 
222 
223 #ifndef GDK_DISABLE_DEPRECATED
224 GType gdk_gc_get_type (void) G_GNUC_CONST;
227  GdkGCValues *values,
228  GdkGCValuesMask values_mask);
229 
231 void gdk_gc_unref (GdkGC *gc);
232 
234  GdkGCValues *values);
236  GdkGCValues *values,
237  GdkGCValuesMask values_mask);
239  const GdkColor *color);
241  const GdkColor *color);
243  GdkFont *font);
245  GdkFunction function);
247  GdkFill fill);
249  GdkPixmap *tile);
251  GdkPixmap *stipple);
253  gint x,
254  gint y);
256  gint x,
257  gint y);
259  GdkBitmap *mask);
261  const GdkRectangle *rectangle);
263  const GdkRegion *region);
265  GdkSubwindowMode mode);
267  gboolean exposures);
269  gint line_width,
270  GdkLineStyle line_style,
271  GdkCapStyle cap_style,
272  GdkJoinStyle join_style);
274  gint dash_offset,
275  gint8 dash_list[],
276  gint n);
278  gint x_offset,
279  gint y_offset);
280 void gdk_gc_copy (GdkGC *dst_gc,
281  GdkGC *src_gc);
282 
283 
285  GdkColormap *colormap);
288  const GdkColor *color);
290  const GdkColor *color);
292 
293 #define gdk_gc_destroy g_object_unref
294 #endif /* GDK_DISABLE_DEPRECATED */
295 
296 G_END_DECLS
297 
298 #endif /* __GDK_DRAWABLE_H__ */
typedefG_BEGIN_DECLS struct _GdkGCValues GdkGCValues
Definition: gdkgc.h:39
GdkColormap * gdk_gc_get_colormap(GdkGC *gc)
void gdk_gc_set_tile(GdkGC *gc, GdkPixmap *tile)
GdkFill
Definition: gdkgc.h:63
@ GDK_STIPPLED
Definition: gdkgc.h:66
@ GDK_OPAQUE_STIPPLED
Definition: gdkgc.h:67
@ GDK_TILED
Definition: gdkgc.h:65
@ GDK_SOLID
Definition: gdkgc.h:64
void gdk_gc_set_colormap(GdkGC *gc, GdkColormap *colormap)
GdkJoinStyle
Definition: gdkgc.h:114
@ GDK_JOIN_MITER
Definition: gdkgc.h:115
@ GDK_JOIN_BEVEL
Definition: gdkgc.h:117
@ GDK_JOIN_ROUND
Definition: gdkgc.h:116
void gdk_gc_set_clip_mask(GdkGC *gc, GdkBitmap *mask)
void gdk_gc_set_values(GdkGC *gc, GdkGCValues *values, GdkGCValuesMask values_mask)
void gdk_gc_set_clip_origin(GdkGC *gc, gint x, gint y)
GdkGC * gdk_gc_ref(GdkGC *gc)
GdkGC * gdk_gc_new(GdkDrawable *drawable)
GdkFunction
Definition: gdkgc.h:89
@ GDK_SET
Definition: gdkgc.h:105
@ GDK_AND_INVERT
Definition: gdkgc.h:96
@ GDK_EQUIV
Definition: gdkgc.h:99
@ GDK_OR_REVERSE
Definition: gdkgc.h:100
@ GDK_COPY_INVERT
Definition: gdkgc.h:101
@ GDK_AND_REVERSE
Definition: gdkgc.h:95
@ GDK_OR
Definition: gdkgc.h:98
@ GDK_NAND
Definition: gdkgc.h:103
@ GDK_OR_INVERT
Definition: gdkgc.h:102
@ GDK_NOOP
Definition: gdkgc.h:97
@ GDK_INVERT
Definition: gdkgc.h:91
@ GDK_NOR
Definition: gdkgc.h:104
@ GDK_AND
Definition: gdkgc.h:94
@ GDK_CLEAR
Definition: gdkgc.h:93
@ GDK_COPY
Definition: gdkgc.h:90
@ GDK_XOR
Definition: gdkgc.h:92
void gdk_gc_set_dashes(GdkGC *gc, gint dash_offset, gint8 dash_list[], gint n)
void gdk_gc_set_stipple(GdkGC *gc, GdkPixmap *stipple)
void gdk_gc_set_font(GdkGC *gc, GdkFont *font)
GdkSubwindowMode
Definition: gdkgc.h:133
@ GDK_CLIP_BY_CHILDREN
Definition: gdkgc.h:134
@ GDK_INCLUDE_INFERIORS
Definition: gdkgc.h:135
void gdk_gc_set_rgb_fg_color(GdkGC *gc, const GdkColor *color)
GdkLineStyle
Definition: gdkgc.h:126
@ GDK_LINE_DOUBLE_DASH
Definition: gdkgc.h:129
@ GDK_LINE_SOLID
Definition: gdkgc.h:127
@ GDK_LINE_ON_OFF_DASH
Definition: gdkgc.h:128
void gdk_gc_set_fill(GdkGC *gc, GdkFill fill)
void gdk_gc_set_clip_region(GdkGC *gc, const GdkRegion *region)
void gdk_gc_copy(GdkGC *dst_gc, GdkGC *src_gc)
GdkGCValuesMask
Definition: gdkgc.h:139
@ GDK_GC_BACKGROUND
Definition: gdkgc.h:141
@ GDK_GC_LINE_STYLE
Definition: gdkgc.h:155
@ GDK_GC_SUBWINDOW
Definition: gdkgc.h:148
@ GDK_GC_JOIN_STYLE
Definition: gdkgc.h:157
@ GDK_GC_LINE_WIDTH
Definition: gdkgc.h:154
@ GDK_GC_FILL
Definition: gdkgc.h:144
@ GDK_GC_STIPPLE
Definition: gdkgc.h:146
@ GDK_GC_CLIP_Y_ORIGIN
Definition: gdkgc.h:152
@ GDK_GC_TS_X_ORIGIN
Definition: gdkgc.h:149
@ GDK_GC_CAP_STYLE
Definition: gdkgc.h:156
@ GDK_GC_TS_Y_ORIGIN
Definition: gdkgc.h:150
@ GDK_GC_EXPOSURES
Definition: gdkgc.h:153
@ GDK_GC_FOREGROUND
Definition: gdkgc.h:140
@ GDK_GC_CLIP_MASK
Definition: gdkgc.h:147
@ GDK_GC_FONT
Definition: gdkgc.h:142
@ GDK_GC_TILE
Definition: gdkgc.h:145
@ GDK_GC_CLIP_X_ORIGIN
Definition: gdkgc.h:151
@ GDK_GC_FUNCTION
Definition: gdkgc.h:143
GdkCapStyle
Definition: gdkgc.h:49
@ GDK_CAP_PROJECTING
Definition: gdkgc.h:53
@ GDK_CAP_BUTT
Definition: gdkgc.h:51
@ GDK_CAP_NOT_LAST
Definition: gdkgc.h:50
@ GDK_CAP_ROUND
Definition: gdkgc.h:52
void gdk_gc_set_ts_origin(GdkGC *gc, gint x, gint y)
void gdk_gc_offset(GdkGC *gc, gint x_offset, gint y_offset)
void gdk_gc_set_foreground(GdkGC *gc, const GdkColor *color)
GdkGC * gdk_gc_new_with_values(GdkDrawable *drawable, GdkGCValues *values, GdkGCValuesMask values_mask)
GdkScreen * gdk_gc_get_screen(GdkGC *gc)
void gdk_gc_set_subwindow(GdkGC *gc, GdkSubwindowMode mode)
void gdk_gc_set_exposures(GdkGC *gc, gboolean exposures)
GType gdk_gc_get_type(void) G_GNUC_CONST
void gdk_gc_get_values(GdkGC *gc, GdkGCValues *values)
void gdk_gc_set_rgb_bg_color(GdkGC *gc, const GdkColor *color)
void gdk_gc_set_background(GdkGC *gc, const GdkColor *color)
void gdk_gc_set_function(GdkGC *gc, GdkFunction function)
void gdk_gc_set_line_attributes(GdkGC *gc, gint line_width, GdkLineStyle line_style, GdkCapStyle cap_style, GdkJoinStyle join_style)
void gdk_gc_unref(GdkGC *gc)
void gdk_gc_set_clip_rectangle(GdkGC *gc, const GdkRectangle *rectangle)
PBD::PropertyDescriptor< uint32_t > color
void rectangle(Cairo::RefPtr< Cairo::Context > context, double x, double y, double w, double h, double r=10)
GObjectClass parent_class
Definition: gdkgc.h:203
void(* get_values)(GdkGC *gc, GdkGCValues *values)
Definition: gdkgc.h:205
void(* set_values)(GdkGC *gc, GdkGCValues *values, GdkGCValuesMask mask)
Definition: gdkgc.h:207
void(* set_dashes)(GdkGC *gc, gint dash_offset, gint8 dash_list[], gint n)
Definition: gdkgc.h:210
void(* _gdk_reserved4)(void)
Definition: gdkgc.h:219
void(* _gdk_reserved2)(void)
Definition: gdkgc.h:217
void(* _gdk_reserved1)(void)
Definition: gdkgc.h:216
void(* _gdk_reserved3)(void)
Definition: gdkgc.h:218
gint ts_x_origin
Definition: gdkgc.h:171
GdkJoinStyle join_style
Definition: gdkgc.h:179
gint clip_y_origin
Definition: gdkgc.h:174
GdkLineStyle line_style
Definition: gdkgc.h:177
gint clip_x_origin
Definition: gdkgc.h:173
GdkColor background
Definition: gdkgc.h:163
GdkCapStyle cap_style
Definition: gdkgc.h:178
GdkColor foreground
Definition: gdkgc.h:162
gint line_width
Definition: gdkgc.h:176
GdkPixmap * tile
Definition: gdkgc.h:167
GdkSubwindowMode subwindow_mode
Definition: gdkgc.h:170
GdkFill fill
Definition: gdkgc.h:166
GdkPixmap * clip_mask
Definition: gdkgc.h:169
GdkFont * font
Definition: gdkgc.h:164
gint ts_y_origin
Definition: gdkgc.h:172
GdkPixmap * stipple
Definition: gdkgc.h:168
gint graphics_exposures
Definition: gdkgc.h:175
Definition: gdkgc.h:190
gint GSEAL(clip_x_origin)
gint GSEAL(ts_y_origin)
GdkColormap * GSEAL(colormap)
GObject parent_instance
Definition: gdkgc.h:191
gint GSEAL(ts_x_origin)
gint GSEAL(clip_y_origin)