/src/wrappers/gtk/library/gtk_graphics_context.e
Specman e | 83 lines | 40 code | 14 blank | 29 comment | 2 complexity | 9ed49711ee56f47a669921ac0157e21d MD5 | raw file
1indexing 2 description: "." 3 copyright: "[ 4 Copyright (C) 2007 Paolo Redaelli, GTK+ team 5 6 This library is free software; you can redistribute it and/or 7 modify it under the terms of the GNU Lesser General Public License 8 as published by the Free Software Foundation; either version 2.1 of 9 the License, or (at your option) any later version. 10 11 This library is distributed in the hopeOA that it will be useful, but 12 WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 Lesser General Public License for more details. 15 16 You should have received a copy of the GNU Lesser General Public 17 License along with this library; if not, write to the Free Software 18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 19 02110-1301 USA 20 ]" 21 22 wrapped_version: "2.10.6" 23 24class GTK_GRAPHICS_CONTEXT 25 -- Graphics context picked from a shared pool of GdkGC 26 -- objects. When a new GdkGC is needed, `make' is called with the 27 -- required depth, colormap and GdkGCValues. If a GdkGC with the 28 -- required properties already exists then that is returned. If 29 -- not, a new GdkGC is created. When the GdkGC is no longer needed, 30 -- `dispose' should be called. 31 32inherit C_STRUCT 33 34creation from_external_pointer 35 36feature {} -- Creation 37 -- TODO: implement creation 38 39 -- gtk_gc_get () 40 -- 41 -- GdkGC* gtk_gc_get (gint depth, 42 -- GdkColormap *colormap, 43 -- GdkGCValues *values, 44 -- GdkGCValuesMask values_mask); 45 -- 46 -- Gets a GdkGC with the given depth, colormap and GdkGCValues. If a GdkGC 47 -- with the given properties already exists then it is returned, otherwise a 48 -- new GdkGC is created. The returned GdkGC should be released with 49 -- gtk_gc_release() when it is no longer needed. 50 -- 51 -- depth : the depth of the GdkGC to create. 52 -- colormap : the GdkColormap (FIXME: I don't know why this is needed). 53 -- values : a GdkGCValues struct containing settings for the GdkGC. 54 -- values_mask : a set of flags indicating which of the fields in values has 55 -- been set. 56 -- Returns : a GdkGC. 57 58feature 59 dispose is 60 -- Releases a GdkGC. 61 do 62 gtk_gc_release(handle) 63 end 64 65feature {} -- External calls 66 gtk_gc_get (a_depth: INTEGER; a_colormap, some_gc_values: POINTER; somegdkgcvaluesmask: INTEGER): POINTER is 67 -- GdkGC* gtk_gc_get (gint depth, GdkColormap *colormap, 68 -- GdkGCValues *values, GdkGCValuesMask values_mask); 69 external "C use <gtk/gtk.h>" 70 end 71 72 gtk_gc_release (a_gc: POINTER) is 73 -- void gtk_gc_release (GdkGC *gc); 74 external "C use <gtk/gtk.h>" 75 end 76 77feature -- size 78 struct_size: INTEGER is 79 external "C inline use <gtk/gtk.h>" 80 alias "sizeof(GdkGC)" 81 end 82 83end -- class GTK_GRAPHICS_CONTEXT