2 * This file is part of gtkD.
4 * gtkD is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * gtkD 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
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with gtkD; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
25 * inFile = gtk-Graphics-Contexts.html
48 * - GdkColormap* -> Colormap
60 import tango
.io
.Stdout
; // use the tango loging?
64 private import gtkc
.gtktypes
;
66 private import gtkc
.gtk
;
69 private import gdk
.GC
;
70 private import gdk
.Colormap
;
77 * These functions provide access to a shared pool of GdkGC objects.
78 * When a new GdkGC is needed, gtk_gc_get() is called with the required depth,
79 * colormap and GdkGCValues. If a GdkGC with the required properties already
80 * exists then that is returned. If not, a new GdkGC is created.
81 * When the GdkGC is no longer needed, gtk_gc_release() should be called.
90 * Gets a GdkGC with the given depth, colormap and GdkGCValues.
91 * If a GdkGC with the given properties already exists then it is returned,
92 * otherwise a new GdkGC is created.
93 * The returned GdkGC should be released with gtk_gc_release() when it is no
96 * the depth of the GdkGC to create.
98 * the GdkColormap (FIXME: I don't know why this is needed).
100 * a GdkGCValues struct containing settings for the GdkGC.
102 * a set of flags indicating which of the fields in values has
107 public static GC
get(int depth
, Colormap colormap
, GdkGCValues
* values
, GdkGCValuesMask valuesMask
)
109 // GdkGC* gtk_gc_get (gint depth, GdkColormap *colormap, GdkGCValues *values, GdkGCValuesMask values_mask);
110 return new GC( gtk_gc_get(depth
, (colormap
is null) ?
null : colormap
.getColormapStruct(), values
, valuesMask
) );
114 * Releases a GdkGC allocated using gtk_gc_get().
118 public static void release(GC gc
)
120 // void gtk_gc_release (GdkGC *gc);
121 gtk_gc_release((gc
is null) ?
null : gc
.getGCStruct());