2 # This file is part of duit.
4 # duit 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 # duit 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 duit; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 # Definitions for wrapping Gdk
31 public import glib.glibtypes;
32 public import gobject.gobjecttypes;
33 public import pango.pangotypes;
34 public import gdkpixbuf.gdkpixbuftypes;
37 alias void* GdkNativeWindow;
63 # must start with wrap
67 ###########################################################
68 ### Gdk ###################################################
69 ###########################################################
71 file: gdk-General.html
76 structWrap: GdkWindow* Window
78 structWrap: GdkCursor* Cursor
93 structWrap: GdkDisplay* Display
95 structWrap: GdkScreen* Screen
97 structWrap: GList* ListG
99 structWrap: GdkEvent* Event
101 #structWrap: GdkScreen** Screen*
102 #import: gdk.ModifierType
103 #structWrap: GdkModifierType* ModifierType
105 structWrap: GdkWindow* Window
106 #import: gdk.DisplayPointerHooks
107 #structWrap: GdkDisplayPointerHooks* DisplayPointerHooks
109 #structWrap: GdkAtom* Atom
112 file: GdkDisplayManager.html
113 struct: GdkDisplayManager
114 class: DisplayManager
115 prefix: gdk_display_manager_
116 import: gdk.DisplayManager
117 structWrap: GdkDisplayManager* DisplayManager
119 structWrap: GdkDisplay* Display
121 structWrap: GSList* ListSG
123 structWrap: GdkDevice* Device
124 outFile: DisplayManager
130 import: cairoLib.cairoLibtypes
133 structWrap: GdkScreen* Screen
135 structWrap: GdkColormap* Colormap
137 structWrap: GdkVisual* Visual
139 structWrap: GdkWindow* Window
141 structWrap: GdkDisplay* Display
143 structWrap: GList* ListG
144 import: gdk.Rectangle
145 structWrap: GdkRectangle* Rectangle
147 structWrap: GdkEvent* Event
148 import: gobject.Value
149 structWrap: GValue* Value
152 file: gdk-Points-Rectangles-and-Regions.html
156 prefix: gdk_rectangle_
157 noprefix: gdk_region_
158 import: gdk.Rectangle
159 structWrap: GdkRectangle* Rectangle
167 structWrap: GdkRegion* Region
169 #structWrap: GdkPoint* Point
170 import: gdk.Rectangle
171 structWrap: GdkRectangle* Rectangle
172 #import: gdk.Rectangle*
173 #structWrap: GdkRectangle** Rectangle*
175 #structWrap: GdkSpan* Span
178 file: gdk-Graphics-Contexts.html
183 structWrap: GdkDrawable* Drawable
184 #import: gdk.GCValues
185 #structWrap: GdkGCValues* GCValues
187 structWrap: GdkScreen* Screen
189 structWrap: GdkGC* GC
191 structWrap: GdkColor* Color
193 structWrap: GdkFont* Font
195 structWrap: GdkPixmap* Pixmap
197 structWrap: GdkBitmap* Bitmap
198 #import: gdk.Rectangle
199 #structWrap: GdkRectangle* Rectangle
201 structWrap: GdkRegion* Region
203 structWrap: GdkColormap* Colormap
206 file: gdk-Drawing-Primitives.html
213 structWrap: GdkDrawable* Drawable
215 structWrap: GdkDisplay* Display
217 structWrap: GdkScreen* Screen
219 structWrap: GdkVisual* Visual
221 structWrap: GdkColormap* Colormap
223 structWrap: GdkRegion* Region
225 structWrap: GdkGC* GC
227 #structWrap: GdkPoint* Point
229 structWrap: GdkPixbuf* Pixbuf
231 #structWrap: GdkSegment* Segment
232 #import: gdk.Trapezoid
233 #structWrap: GdkTrapezoid* Trapezoid
235 structWrap: GdkColor* Color
237 structWrap: GdkFont* Font
239 #structWrap: GdkWChar* WChar
241 structWrap: GdkImage* ImageGdk
243 import: pango.PgContext
244 structWrap: PangoContext* PgContext
246 structWrap: PangoItem* PgItem
247 import: pango.PgLayout
248 structWrap: PangoLayout* PgLayout
249 import: pango.PgFontDescription
250 structWrap: PangoFontDescription* PgFontDescription
251 import: pango.PgFontMetrics
252 structWrap: PangoFontMetrics* PgFontMetrics
253 import: pango.PgFontFamily
254 structWrap: PangoFontFamily* PgFontFamily
255 import: pango.PgFontFace
256 structWrap: PangoFontFace* PgFontFace
257 import: pango.PgFontMap
258 structWrap: PangoFontMap* PgFontMap
259 import: pango.PgFontsetSimple
260 structWrap: PangoFontsetSimple* PgFontsetSimple
261 import: pango.PgAttribute
262 structWrap: PangoAttribute* PgAttribute
263 import: pango.PgAttributeList
264 structWrap: PangoAttributeList* PgAttributeList
265 import: pango.PgLanguage
266 structWrap: PangoLanguage* PgLanguage
267 import: pango.PgTabArray
268 structWrap: PangoTabArray* PgTabArray
269 import: pango.PgLayout
270 structWrap: PangoLayout* PgLayout
271 import: pango.PgLayoutIter
272 structWrap: PangoLayoutIter* PgLayoutIter
273 import: pango.PgScriptIter
274 structWrap: PangoScriptIter* PgScriptIter
278 * Draws an outlined or filled polygon.
280 * a GdkDrawable (a GdkWindow or a GdkPixmap).
284 * TRUE if the polygon should be filled. The polygon is closed
285 * automatically, connecting the last point to the first point if
288 * an array of GdkPoint structures specifying the points making
291 public void drawPolygon(GC gc, int filled, GdkPoint[] points)
293 // void gdk_draw_polygon (GdkDrawable *drawable, GdkGC *gc, gboolean filled, GdkPoint *points, gint npoints);
294 gdk_draw_polygon(gdkDrawable, gc.getGCStruct(), filled, points.ptr, points.length);
300 file: gdk-Bitmaps-and-Pixmaps.html
305 noprefix: gdk_bitmap_
308 structWrap: GdkDrawable* Drawable
310 structWrap: GdkPixmap* Pixmap
312 structWrap: GdkColor* Color
314 #structWrap: GdkBitmap** Bitmap*
316 structWrap: GdkColormap* Colormap
325 structWrap: GdkBitmap* Bitmap
327 structWrap: GdkDrawable* Drawable
330 file: gdk-GdkRGB.html
334 structWrap: GdkDrawable* Drawable
336 structWrap: GdkGC* GC
338 #structWrap: GdkRgbCmap* RgbCmap
340 structWrap: GdkColormap* Colormap
342 structWrap: GdkColor* Color
344 structWrap: GdkVisual* Visual
347 file: gdk-Images.html
352 structWrap: GdkVisual* Visual
354 structWrap: GdkDrawable* Drawable
356 structWrap: GdkColormap* Colormap
359 ## move to GdkPixbuf? no?
360 ## extend GdkPixbuf? Yes?
364 file: gdk-Pixbufs.html
371 file: /home/ruimt/data/down/GTK/API/gdk-pixbuf/gdk-pixbuf-creating.html
376 noprefix: gdk_pixbuf_ref
377 noprefix: gdk_pixbuf_unref
379 #structWrap: GError** Error*
380 import: gdkpixbuf.Pixbuf
381 structWrap: GdkPixbuf* Pixbuf
382 import: gdkpixbuf.PixbufFormat
383 structWrap: GdkPixbufFormat* PixbufFormat
386 gdk_pixbuf_get_type ()
388 GType gdk_pixbuf_get_type ();
394 file: /home/ruimt/data/down/GTK/API/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html
397 file: /home/ruimt/data/down/GTK/API/gdk-pixbuf/gdk-pixbuf-refcounting.html
400 file: /home/ruimt/data/down/GTK/API/gdk-pixbuf/gdk-pixbuf-file-loading.html
401 noprefix: gdk_pixbuf_get_file_info
404 file: /home/ruimt/data/down/GTK/API/gdk-pixbuf/gdk-pixbuf-file-saving.html
407 file: /home/ruimt/data/down/GTK/API/gdk-pixbuf/gdk-pixbuf-scaling.html
410 file: /home/ruimt/data/down/GTK/API/gdk-pixbuf/gdk-pixbuf-util.html
413 file: gdk-Colormaps-and-Colors.html
417 prefix: gdk_colormap_
420 structWrap: GdkVisual* Visual
422 structWrap: GdkColormap* Colormap
424 structWrap: GdkColor* Color
426 structWrap: GdkScreen* Screen
435 structWrap: GdkColor* Color
437 structWrap: GdkColormap* Colormap
445 * Creates a new Color
452 this(ubyte red, ubyte green, ubyte blue)
455 set8(red, green, blue);
459 * Creates a new Color with RGB values
464 this(guint16 red, guint16 green, guint16 blue)
467 //printf("Color.this red , green , blue = %d %d %d\n", red, green, blue);
474 //printf("Color.this uint %X\n",rgb);
475 set( ((rgb&0xFFFF)),((rgb&0xFFFF00000000)>>32),(rgb&0xFFFF0000)>>16);
481 //printf("Color.this int %X\n",rgb);
482 set8( cast(byte)((rgb&0xFF0000)>>16),cast(byte)((rgb&0x00FF00)>>8),cast(byte)(rgb&0xFF));
489 _black = new Color(cast(ubyte)0,cast(ubyte)0,cast(ubyte)0);
497 _white = new Color(cast(ubyte)255,cast(ubyte)255,cast(ubyte)255);
503 * Sets the Color with RGB values
508 void set(guint16 red, guint16 green, guint16 blue)
510 //printf("Color.set %X %X %X\n",red,green,blue);
512 gdkColor.green = green;
513 gdkColor.blue = blue;
514 gdkColor.pixel = (red&0xFF00 << 8) | (green&0xFF00) | (blue >> 8) ;
515 //printf("Color.pixel %X \n",gdkColor.pixel);
517 //printf("set pixel = %X\n", gdkColor.pixel);
520 void set8(ubyte red, ubyte green, ubyte blue)
522 //printf("Color.set %X %X %X\n",red,green,blue);
524 gdkColor.red = red * 257;
525 gdkColor.green = green * 257;
526 gdkColor.blue = blue * 257;
527 gdkColor.pixel = (red << 16) | (green << 8 ) | blue;
528 //printf("set8 pixel = %X\n", gdkColor.pixel);
533 return (gdkColor.red <<32) | (gdkColor.green << 16) | (gdkColor.blue);
538 return ((gdkColor.red&0xFF00)<<8 ) | ((gdkColor.green&0xFF00)) | ((gdkColor.blue&0xFF00) >>8);
543 return gdkColor.pixel;
549 file: gdk-Visuals.html
553 #import: gdk.VisualType*
554 #structWrap: GdkVisualType** VisualType*
556 structWrap: GList* ListG
558 structWrap: GdkVisual* Visual
560 structWrap: GdkScreen* Screen
570 structWrap: GdkFont* Font
572 structWrap: GdkDisplay* Display
574 #structWrap: GdkWChar* WChar
578 * Create and loads a font
580 public this(char[] fontName)
582 this(gdk_font_load(Str.toStringz(fontName)));
587 file: gdk-Cursors.html
593 structWrap: GdkPixmap* Pixmap
595 structWrap: GdkColor* Color
597 structWrap: GdkDisplay* Display
599 structWrap: GdkPixbuf* Pixbuf
601 structWrap: GdkCursor* Cursor
604 file: gdk-Windows.html
608 noprefix: gdk_window_invalidate_maybe_recurse
610 #import: gdk.WindowAttr
611 #structWrap: GdkWindowAttr* WindowAttr
613 structWrap: GdkWindow* Window
615 structWrap: GdkRegion* Region
616 #import: gdk.Geometry
617 #structWrap: GdkGeometry* Geometry
618 import: gdk.Rectangle
619 structWrap: GdkRectangle* Rectangle
620 #import: gdk.Drawable*
621 #structWrap: GdkDrawable** Drawable*
623 structWrap: GdkBitmap* Bitmap
625 structWrap: GdkColor* Color
627 structWrap: GdkPixmap* Pixmap
629 structWrap: GdkCursor* Cursor
631 structWrap: GList* ListG
632 #import: gdk.ModifierType
633 #structWrap: GdkModifierType* ModifierType
634 #import: gdk.WMDecoration
635 #structWrap: GdkWMDecoration* WMDecoration
636 #import: gdk.PointerHooks
637 #structWrap: GdkPointerHooks* PointerHooks
640 file: gdk-Events.html
646 structWrap: GdkEvent* Event
648 structWrap: GdkWindow* Window
649 #import: gdk.ModifierType
650 #structWrap: GdkModifierType* ModifierType
652 structWrap: GdkDisplay* Display
654 structWrap: GdkScreen* Screen
655 import: gobject.Value
656 structWrap: GValue* Value
659 public static bool isDoubleClick(GdkEventButton* eventButton, int buttonNumber=1)
661 return eventButton.button==buttonNumber
662 && eventButton.type == EventType.DOUBLE_BUTTON_PRESS;
665 public static bool isTrippleClick(GdkEventButton* eventButton, int buttonNumber=1)
667 return eventButton.button==buttonNumber
668 && eventButton.type == EventType.TRIPPLE_BUTTON_PRESS;
675 file: gdk-Event-Structures.html
681 file: gdk-Keyboard-Handling.html
687 structWrap: GdkKeymap* Keymap
689 structWrap: GdkDisplay* Display
690 #import: gdk.KeymapKey
691 #structWrap: GdkKeymapKey* KeymapKey
692 #import: gdk.ModifierType
693 #structWrap: GdkModifierType* ModifierType
694 #import: gdk.KeymapKey*
695 #structWrap: GdkKeymapKey** KeymapKey*
698 file: gdk-Selections.html
700 prefix: gdk_selection_
702 structWrap: GdkWindow* Window
704 structWrap: GdkDisplay* Display
706 #structWrap: GdkAtom* Atom
709 file: gdk-Drag-and-Drop.html
710 struct: GdkDragContext
712 prefix: gdk-drag_context_
713 import: gdk.DragContext
714 structWrap: GdkDragContext* DragContext
716 structWrap: GdkWindow* Window
718 #structWrap: GdkWindow** Window*
719 #import: gdk.DragProtocol
720 #structWrap: GdkDragProtocol* DragProtocol
722 structWrap: GdkScreen* Screen
724 structWrap: GList* ListG
726 structWrap: GdkDisplay* Display
730 #file: gdk-Properties-and-Atoms.html
736 file: gdk-Threads.html
746 file: gdk-Input-Devices.html
751 structWrap: GList* ListG
753 structWrap: GdkDevice* Device
755 structWrap: GdkWindow* Window
758 #file: gdk-Pango-Interaction.html
764 #file: gdk-Cairo-Interaction.html
769 #file: gdk-X-Window-System-Interaction.html
776 ############## cairo interaction ###############
779 file: gdk-Cairo-Interaction.html
782 import: cairoLib.Cairo
783 structWrap: cairo_t* Cairo
785 structWrap: GdkDrawable* Drawable
787 structWrap: GdkColor* Color
789 structWrap: GdkPixbuf* Pixbuf
791 structWrap: GdkPixmap* Pixmap
792 import: gdk.Rectangle
793 structWrap: GdkRectangle* Rectangle
795 structWrap: GdkRegion* Region