# # This file is part of gtkD. # # gtkD is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # gtkD is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with gtkD; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # #alias: void* GdkAtom // in main APILookup.. #alias void* GdkNativeWindow; ignoreEnum: GdkFilterReturn # must start with wrap structCode: GdkColor uint pixel; ushort red; ushort green; ushort blue; structCode: end wrap: gdk jsPackage: Gdk ########################################################### ### Gdk ################################################### ########################################################### structWrapJS: GdkPixbuf structWrapJS: GdkEvent nostruct: GdkGCValues nostruct: GdkGeometry nostruct: GdkDisplayPointerHooks nostruct: GdkPoint nostruct: GdkWindowAttr nostruct: GdkTrapezoid nostruct: GdkKeymapKey nostruct: GdkSegment nostruct: GdkRgbCmap nostruct: GdkEventClient file: gdk-General.html class: Gdk jsClass: Gdk ctype: static prefix: gdk_ import: glib.Str import: gdk.Window import: glib.bindingglibtypes import: gobject.bindinggobjecttypes import: pango.bindingpangotypes import: gdkpixbuf.bindinggdkpixbuftypes structWrap: GdkWindow* Window import: gdk.Cursor structWrap: GdkCursor* Cursor outFile: Gdk #file: multihead.html #struct: #class: #prefix: #outFile: file: GdkDisplay.html struct: GdkDisplay class: Display prefix: gdk_display_ import: glib.Str import: gdk.Display structWrap: GdkDisplay* Display import: gdk.Screen structWrap: GdkScreen* Screen import: glib.ListG structWrap: GList* ListG import: gdk.Event structWrap: GdkEvent* Event #import: gdk.Screen* #structWrap: GdkScreen** Screen* #import: gdk.ModifierType #structWrap: GdkModifierType* ModifierType import: gdk.Window structWrap: GdkWindow* Window #import: gdk.DisplayPointerHooks #structWrap: GdkDisplayPointerHooks* DisplayPointerHooks #import: gdk.Atom #structWrap: GdkAtom* Atom outFile: Display file: GdkDisplayManager.html struct: GdkDisplayManager class: DisplayManager prefix: gdk_display_manager_ import: gdk.DisplayManager structWrap: GdkDisplayManager* DisplayManager import: gdk.Display structWrap: GdkDisplay* Display import: glib.ListSG structWrap: GSList* ListSG import: gdk.Device structWrap: GdkDevice* Device outFile: DisplayManager file: GdkScreen.html struct: GdkScreen class: Screen prefix: gdk_screen_ import: glib.Str import: gdk.Screen import: gdk.Colormap import: gdk.Visual import: gdk.Window import: gdk.Display import: glib.ListG import: gdk.Rectangle import: gdk.Event import: gobject.Value outFile: Screen file: gdk-Points-Rectangles-and-Regions.html struct: GdkRectangle class: Rectangle prefix: gdk_rectangle_ noprefix: gdk_region_ import: gdk.Rectangle structWrap: GdkRectangle* Rectangle outFile: Rectangle struct: GdkRegion class: Region prefix: gdk_region_ strictPrefix: Yes import: gdk.Region structWrap: GdkRegion* Region #import: gdk.Point #structWrap: GdkPoint* Point import: gdk.Rectangle structWrap: GdkRectangle* Rectangle #import: gdk.Rectangle* #structWrap: GdkRectangle** Rectangle* #import: gdk.Span #structWrap: GdkSpan* Span outFile: Region file: gdk-Graphics-Contexts.html struct: GdkGC class: GC prefix: gdk_gc_ import: gdk.Drawable import: gdk.Screen import: gdk.GC import: gdk.Color import: gdk.Font import: gdk.Pixmap import: gdk.Bitmap import: gdk.Region import: gdk.Colormap outFile: GC file: gdk-Drawing-Primitives.html struct: GdkDrawable class: Drawable prefix: gdk_drawable_ prefix: gdk_ import: glib.Str import: gdk.Drawable structWrap: GdkDrawable* Drawable import: gdk.Display structWrap: GdkDisplay* Display import: gdk.Screen structWrap: GdkScreen* Screen import: gdk.Visual structWrap: GdkVisual* Visual import: gdk.Colormap structWrap: GdkColormap* Colormap import: gdk.Region structWrap: GdkRegion* Region import: gdk.GC structWrap: GdkGC* GC #import: gdk.Point #structWrap: GdkPoint* Point import: gdk.Pixbuf structWrap: GdkPixbuf* Pixbuf #import: gdk.Segment #structWrap: GdkSegment* Segment #import: gdk.Trapezoid #structWrap: GdkTrapezoid* Trapezoid import: gdk.Color structWrap: GdkColor* Color import: gdk.Font structWrap: GdkFont* Font #import: gdk.WChar #structWrap: GdkWChar* WChar import: gdk.ImageGdk structWrap: GdkImage* ImageGdk import: pango.PgContext structWrap: PangoContext* PgContext import: pango.PgItem structWrap: PangoItem* PgItem import: pango.PgLayout structWrap: PangoLayout* PgLayout import: pango.PgFontDescription structWrap: PangoFontDescription* PgFontDescription import: pango.PgFontMetrics structWrap: PangoFontMetrics* PgFontMetrics import: pango.PgFontFamily structWrap: PangoFontFamily* PgFontFamily import: pango.PgFontFace structWrap: PangoFontFace* PgFontFace import: pango.PgFontMap structWrap: PangoFontMap* PgFontMap import: pango.PgFontsetSimple structWrap: PangoFontsetSimple* PgFontsetSimple import: pango.PgAttribute structWrap: PangoAttribute* PgAttribute import: pango.PgAttributeList structWrap: PangoAttributeList* PgAttributeList import: pango.PgLanguage structWrap: PangoLanguage* PgLanguage import: pango.PgTabArray structWrap: PangoTabArray* PgTabArray import: pango.PgLayout structWrap: PangoLayout* PgLayout import: pango.PgLayoutIter structWrap: PangoLayoutIter* PgLayoutIter import: pango.PgScriptIter structWrap: PangoScriptIter* PgScriptIter code: start /** * Draws an outlined or filled polygon. * drawable: * a GdkDrawable (a GdkWindow or a GdkPixmap). * gc: * a GdkGC. * filled: * TRUE if the polygon should be filled. The polygon is closed * automatically, connecting the last point to the first point if * necessary. * points: * an array of GdkPoint structures specifying the points making * up the polygon. */ public void drawPolygon(GC gc, int filled, GdkPoint[] points) { // void gdk_draw_polygon (GdkDrawable *drawable, GdkGC *gc, gboolean filled, GdkPoint *points, gint npoints); gdk_draw_polygon(gdkDrawable, gc.getGCStruct(), filled, points.ptr, points.length); } code: end outFile: Drawable file: gdk-Bitmaps-and-Pixmaps.html struct: GdkPixmap class: Pixmap prefix: gdk_pixmap_ noprefix: gdk_bitmap_ import: glib.Str import: gdk.Drawable import: gdk.Pixmap import: gdk.Color import: gdk.Colormap outFile: Pixmap struct: GdkBitmap class: Bitmap prefix: gdk_bitmap_ strictPrefix: Yes import: glib.Str import: gdk.Bitmap structWrap: GdkBitmap* Bitmap import: gdk.Drawable structWrap: GdkDrawable* Drawable outFile: Bitmap file: gdk-GdkRGB.html class: RGB prefix: gdk_ import: gdk.Drawable structWrap: GdkDrawable* Drawable import: gdk.GC structWrap: GdkGC* GC #import: gdk.RgbCmap #structWrap: GdkRgbCmap* RgbCmap import: gdk.Colormap structWrap: GdkColormap* Colormap import: gdk.Color structWrap: GdkColor* Color import: gdk.Visual structWrap: GdkVisual* Visual outFile: RGB file: gdk-Images.html struct: GdkImage class: ImageGdk prefix: gdk_image_ import: gdk.Visual structWrap: GdkVisual* Visual import: gdk.Drawable structWrap: GdkDrawable* Drawable import: gdk.Colormap structWrap: GdkColormap* Colormap outFile: ImageGdk ## move to GdkPixbuf? no? ## extend GdkPixbuf? Yes? file: gdk-Pixbufs.html struct: GdkPixbuf class: Pixbuf prefix: gdk_pixbuf_ import: glib.Str import: gdkpixbuf.bindinggdkpixbuftypes import: gdkpixbuf.PixbufLoader import: gdkpixbuf.Pixdata import: gdkpixbuf.PixbufFormat import: gdkpixbuf.PixbufAnimation jsfunc: GType gdk_pixbuf_get_type (); jscode: gdk_pixbuf_new_from_file char[] _arg_filename = arglist[0].toString(); Wrapped_GError* _arg_error; Wrapped_GdkPixbuf* _ret = cast(Wrapped_GdkPixbuf* ) gdk_pixbuf_new_from_file( std.string.toStringz(_arg_filename), &_arg_error); ret.putVobject(new dsWrapped_GdkPixbuf(_ret)); jscode: end jscode: gdk_pixbuf_get_type ret.putVnumber( cast(uint) gdk_pixbuf_get_type()); jscode: end jscode: gdk_pixbuf_new // create it from xpm data.. if (arglist.length == 5) { Enum_GdkColorspace _arg_colorspace = cast(Enum_GdkColorspace) (arglist[0].toInteger()); int _arg_has_alpha = cast(int) (arglist[1].toInteger()); int _arg_bits_per_sample = cast(int) (arglist[2].toInteger()); int _arg_width = cast(int) (arglist[3].toInteger()); int _arg_height = cast(int) (arglist[4].toInteger()); Wrapped_GdkPixbuf* _ret = cast(Wrapped_GdkPixbuf* ) (gdk_pixbuf_new(_arg_colorspace,_arg_has_alpha,_arg_bits_per_sample,_arg_width,_arg_height)); if (!_ret) { ret.putVnull(); return null; } ret.putVobject(new dsWrapped_GdkPixbuf(_ret)); return null; } if ((arglist[0].vtype == V_OBJECT) && ( cast(Darray) arglist[0].toObject() ) ) { // it's an array of char's... // find out the length.. Darray items = cast(Darray) arglist[0].toObject(); char** send = (new char*[items.ulength]).ptr; for(uint i = 0; i < items.ulength; i++) { send[i] = cast(char*) (items.Get(i).toString()); } Wrapped_GdkPixbuf* _ret = cast(Wrapped_GdkPixbuf* ) gdk_pixbuf_new_from_xpm_data(send); if (!_ret) { ret.putVnull(); return null; } ret.putVobject(new dsWrapped_GdkPixbuf(_ret)); return null; } throw new Exception("invalid arguments to new Gdk.Pixbuf()"); jscode: end openFile: Pixbuf file: ../gdk-pixbuf/gdk-pixbuf-creating.html struct: GdkPixbuf class: Pixbuf import: glib.Str prefix: gdk_pixbuf_ noprefix: gdk_pixbuf_ref noprefix: gdk_pixbuf_unref import: gdkpixbuf.PixbufFormat text: start gdk_pixbuf_get_type () GType gdk_pixbuf_get_type ();