# # 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 ();
text: end mergeFile: Pixbuf file: ../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html mergeFile: Pixbuf file: ../gdk-pixbuf/gdk-pixbuf-refcounting.html mergeFile: Pixbuf file: ../gdk-pixbuf/gdk-pixbuf-file-loading.html noprefix: gdk_pixbuf_get_file_info mergeFile: Pixbuf file: ../gdk-pixbuf/gdk-pixbuf-file-saving.html mergeFile: Pixbuf file: ../gdk-pixbuf/gdk-pixbuf-scaling.html mergeFile: Pixbuf file: ../gdk-pixbuf/gdk-pixbuf-util.html closeFile: Pixbuf file: gdk-Colormaps-and-Colors.html struct: GdkColormap class: Colormap prefix: gdk_colormap_ noprefix: gdk_color_ import: gdk.Visual structWrap: GdkVisual* Visual import: gdk.Colormap structWrap: GdkColormap* Colormap import: gdk.Color structWrap: GdkColor* Color import: gdk.Screen structWrap: GdkScreen* Screen outFile: Colormap struct: GdkColor class: Color prefix: gdk_color_ import: glib.Str strictPrefix: Yes import: gdk.Color structWrap: GdkColor* Color import: gdk.Colormap structWrap: GdkColormap* Colormap jscode: gdk_color_new ushort red; ushort green; ushort blue; if (arglist.length == 1) { // we should work with simple RGB... - if we need more precise use the r,g,b method.. red = cast(ushort) ((cast(ulong)arglist[0].toInteger() & 0xFF0000) >> 16) * 0xff; green = cast(ushort) ((cast(ulong)arglist[0].toInteger() & 0xFF00)>>8) * 0xff; blue = cast(ushort) ((cast(ulong)arglist[0].toInteger() &0xFF) * 0xff) ; } else { red = cast(ushort) arglist[0].toInteger(); green = cast(ushort) arglist[1].toInteger(); blue = cast(ushort) arglist[2].toInteger(); } Wrapped_GdkColor* _ret = new Wrapped_GdkColor; _ret.red= red; _ret.green = green; _ret.blue = blue; _ret.pixel = (red&0xFF00 << 8) | (green&0xFF00) | (blue >> 8) ; ret.putVobject(new dsWrapped_GdkColor(_ret)); jscode: end code: start static Color _black; static Color _white; /** * Creates a new Color */ this() { this(new GdkColor); } this(ubyte red, ubyte green, ubyte blue) { this(); set8(red, green, blue); } /** * Creates a new Color with RGB values * @param red * @param green * @param blue */ this(guint16 red, guint16 green, guint16 blue) { this(); //printf("Color.this red , green , blue = %d %d %d\n", red, green, blue); set(red,green,blue); } this(uint rgb) { this(); //printf("Color.this uint %X\n",rgb); set( ((rgb&0xFFFF)),((rgb&0xFFFF00000000)>>32),(rgb&0xFFFF0000)>>16); } this(int rgb) { this(); //printf("Color.this int %X\n",rgb); set8( cast(byte)((rgb&0xFF0000)>>16),cast(byte)((rgb&0x00FF00)>>8),cast(byte)(rgb&0xFF)); } static Color black() { if ( !_black ) { _black = new Color(cast(ubyte)0,cast(ubyte)0,cast(ubyte)0); } return _black; } static Color white() { if ( !_white ) { _white = new Color(cast(ubyte)255,cast(ubyte)255,cast(ubyte)255); } return _white; } /** * Sets the Color with RGB values * @param red * @param green * @param blue */ void set(guint16 red, guint16 green, guint16 blue) { //printf("Color.set %X %X %X\n",red,green,blue); gdkColor.red = red; gdkColor.green = green; gdkColor.blue = blue; gdkColor.pixel = (red&0xFF00 << 8) | (green&0xFF00) | (blue >> 8) ; //printf("Color.pixel %X \n",gdkColor.pixel); //allocColor(); //printf("set pixel = %X\n", gdkColor.pixel); } void set8(ubyte red, ubyte green, ubyte blue) { //printf("Color.set %X %X %X\n",red,green,blue); gdkColor.red = red * 257; gdkColor.green = green * 257; gdkColor.blue = blue * 257; gdkColor.pixel = (red << 16) | (green << 8 ) | blue; //printf("set8 pixel = %X\n", gdkColor.pixel); } uint getValue() { return (gdkColor.red <<32) | (gdkColor.green << 16) | (gdkColor.blue); } int getValue24() { return ((gdkColor.red&0xFF00)<<8 ) | ((gdkColor.green&0xFF00)) | ((gdkColor.blue&0xFF00) >>8); } uint getPixelValue() { return gdkColor.pixel; } code: end outFile: Color file: gdk-Visuals.html struct: GdkVisual class: Visual prefix: gdk_visual_ #import: gdk.VisualType* #structWrap: GdkVisualType** VisualType* import: glib.ListG structWrap: GList* ListG import: gdk.Visual structWrap: GdkVisual* Visual import: gdk.Screen structWrap: GdkScreen* Screen outFile: Visual file: gdk-Fonts.html struct: GdkFont class: Font prefix: gdk_font_ prefix: gdk_ import: glib.Str import: gdk.Font structWrap: GdkFont* Font import: gdk.Display structWrap: GdkDisplay* Display #import: gdk.WChar #structWrap: GdkWChar* WChar code: start /** * Create and loads a font */ public this(char[] fontName) { this(gdk_font_load(Str.toStringz(fontName))); } code: end outFile: Font file: gdk-Cursors.html struct: GdkCursor class: Cursor prefix: gdk_cursor_ import: glib.Str import: gdk.Pixmap structWrap: GdkPixmap* Pixmap import: gdk.Color structWrap: GdkColor* Color import: gdk.Display structWrap: GdkDisplay* Display import: gdk.Pixbuf structWrap: GdkPixbuf* Pixbuf import: gdk.Cursor structWrap: GdkCursor* Cursor outFile: Cursor file: gdk-Windows.html struct: GdkWindow class: Window prefix: gdk_window_ noprefix: gdk_window_invalidate_maybe_recurse import: glib.Str #import: gdk.WindowAttr #structWrap: GdkWindowAttr* WindowAttr import: gdk.Window structWrap: GdkWindow* Window import: gdk.Region structWrap: GdkRegion* Region #import: gdk.Geometry #structWrap: GdkGeometry* Geometry import: gdk.Rectangle structWrap: GdkRectangle* Rectangle import: gdk.Drawable #structWrap: GdkDrawable** Drawable* import: gdk.Bitmap structWrap: GdkBitmap* Bitmap import: gdk.Color structWrap: GdkColor* Color import: gdk.Pixmap structWrap: GdkPixmap* Pixmap import: gdk.Cursor structWrap: GdkCursor* Cursor import: glib.ListG structWrap: GList* ListG #import: gdk.ModifierType #structWrap: GdkModifierType* ModifierType #import: gdk.WMDecoration #structWrap: GdkWMDecoration* WMDecoration #import: gdk.PointerHooks #structWrap: GdkPointerHooks* PointerHooks outFile: Window file: gdk-Events.html struct: GdkEvent class: Event prefix: gdk_event_ import: glib.Str import: gdk.Event import: gdk.Window #import: gdk.ModifierType import: gdk.Display import: gdk.Screen import: gobject.Value code: start public static bool isDoubleClick(GdkEventButton* eventButton, int buttonNumber=1) { return eventButton.button==buttonNumber && eventButton.type == EventType.DOUBLE_BUTTON_PRESS; } public static bool isTrippleClick(GdkEventButton* eventButton, int buttonNumber=1) { return eventButton.button==buttonNumber && eventButton.type == EventType.TRIPPLE_BUTTON_PRESS; } code: end outFile: Event file: gdk-Keyboard-Handling.html struct: GdkKeymap class: Keymap prefix: gdk_keymap_ import: glib.Str import: gdk.Keymap import: pango.bindingpangotypes structWrap: GdkKeymap* Keymap import: gdk.Display structWrap: GdkDisplay* Display #import: gdk.KeymapKey #structWrap: GdkKeymapKey* KeymapKey #import: gdk.ModifierType #structWrap: GdkModifierType* ModifierType #import: gdk.KeymapKey* #structWrap: GdkKeymapKey** KeymapKey* outFile: Keymap file: gdk-Selections.html class: Selection prefix: gdk_selection_ import: gdk.Window structWrap: GdkWindow* Window import: gdk.Display structWrap: GdkDisplay* Display #import: gdk.Atom #structWrap: GdkAtom* Atom outFile: Selection file: gdk-Drag-and-Drop.html struct: GdkDragContext class: DragContext prefix: gdk-drag_context_ import: gdk.DragContext structWrap: GdkDragContext* DragContext import: gdk.Window structWrap: GdkWindow* Window #import: gdk.Window* #structWrap: GdkWindow** Window* #import: gdk.DragProtocol #structWrap: GdkDragProtocol* DragProtocol import: gdk.Screen structWrap: GdkScreen* Screen import: glib.ListG structWrap: GList* ListG import: gdk.Display structWrap: GdkDisplay* Display outFile: DragContext # no struct #file: gdk-Properties-and-Atoms.html #struct: #class: #prefix: #outFile: #file: gdk-Threads.html #class: #prefix: #outFile: Threads file: gdk-Input.html class: Input prefix: gdk_input_ outFile: Input file: gdk-Input-Devices.html struct: GdkDevice class: Device prefix: gdk_device_ import: glib.ListG structWrap: GList* ListG import: gdk.Device structWrap: GdkDevice* Device import: gdk.Window structWrap: GdkWindow* Window outFile: Device #file: gdk-Pango-Interaction.html #struct: #class: #prefix: #outFile: #file: gdk-X-Window-System-Interaction.html ##struct: #class: X11 #prefix: gdk_x11_ #outFile: X11 ############## cairo interaction ############### file: gdk-Cairo-Interaction.html class: GdkCairo prefix: gdk_cairo_ import: cairoLib.Cairo import: cairoLib.bindingcairoLibtypes nocode: gdk_cairo_create nocode: gdk_cairo_set_source_color nocode: gdk_cairo_set_source_pixbuf nocode: gdk_cairo_set_source_pixmap nocode: gdk_cairo_rectangle nocode: gdk_cairo_region #code: start #code: end outFile: GdkCairo file: gdk-Event-Structures.html structDump: GdkEventCrossing structDump: GdkEventAny structDump: GdkEventKey structDump: GdkEventButton structDump: GdkEventScroll structDump: GdkEventMotion structDump: GdkEventExpose structDump: GdkEventVisibility structDump: GdkEventCrossing structDump: GdkEventFocus structDump: GdkEventConfigure structDump: GdkEventProperty structDump: GdkEventSelection #structDump: GdkNativeWindow structDump: GdkEventDND structDump: GdkEventProximity #structDump: GdkEventClient structDump: GdkEventNoExpose structDump: GdkEventWindowState structDump: GdkEventSetting structDump: GdkEventOwnerChange structDump: GdkEventGrabBroken