From 4ceb0a079b99cb7190c70dabd7fa016e0fb831fa Mon Sep 17 00:00:00 2001 From: WebFreak001 Date: Tue, 3 Nov 2020 00:14:15 +0100 Subject: [PATCH] add gnome docking library (gdl) fix #304 --- Build.d | 7 +- GNUmakefile | 53 +- README.md | 1 + demos/gtkD/DemoGdl/DemoGdl.d | 76 +++ demos/gtkD/DemoGdl/dub.json | 10 + demos/gtkD/TestWindow/dub.json | 3 +- .../{TestWindow => _shared}/TestDrawingArea.d | 0 docs/candydoc/explorer.js | 2 + dub.json | 12 +- generated/gdl/gdl/Dock.d | 290 +++++++++ generated/gdl/gdl/DockBar.d | 143 +++++ generated/gdl/gdl/DockItem.d | 585 +++++++++++++++++ generated/gdl/gdl/DockItemButtonImage.d | 93 +++ generated/gdl/gdl/DockItemClass.d | 75 +++ generated/gdl/gdl/DockItemGrip.d | 149 +++++ generated/gdl/gdl/DockLayout.d | 249 ++++++++ generated/gdl/gdl/DockMaster.d | 193 ++++++ generated/gdl/gdl/DockNotebook.d | 91 +++ generated/gdl/gdl/DockObject.d | 548 ++++++++++++++++ generated/gdl/gdl/DockPaned.d | 94 +++ generated/gdl/gdl/DockParam.d | 67 ++ generated/gdl/gdl/DockPlaceholder.d | 109 ++++ generated/gdl/gdl/DockTablabel.d | 111 ++++ generated/gdl/gdl/PreviewWindow.d | 107 ++++ generated/gdl/gdl/Switcher.d | 117 ++++ generated/gdl/gdl/c/functions.d | 596 ++++++++++++++++++ generated/gdl/gdl/c/types.d | 565 +++++++++++++++++ generated/gdl/gdlc/gdl.d | 22 + generated/gdl/gdlc/gdltypes.d | 22 + makeddox.sh | 5 +- makedocs.sh | 5 +- src/APILookup.txt | 4 + src/APILookupGdl.txt | 44 ++ src/gdlc/gdl.d | 22 + src/gdlc/gdltypes.d | 22 + src/gtkd/paths.d | 4 + 36 files changed, 4484 insertions(+), 12 deletions(-) create mode 100644 demos/gtkD/DemoGdl/DemoGdl.d create mode 100644 demos/gtkD/DemoGdl/dub.json rename demos/gtkD/{TestWindow => _shared}/TestDrawingArea.d (100%) create mode 100644 generated/gdl/gdl/Dock.d create mode 100644 generated/gdl/gdl/DockBar.d create mode 100644 generated/gdl/gdl/DockItem.d create mode 100644 generated/gdl/gdl/DockItemButtonImage.d create mode 100644 generated/gdl/gdl/DockItemClass.d create mode 100644 generated/gdl/gdl/DockItemGrip.d create mode 100644 generated/gdl/gdl/DockLayout.d create mode 100644 generated/gdl/gdl/DockMaster.d create mode 100644 generated/gdl/gdl/DockNotebook.d create mode 100644 generated/gdl/gdl/DockObject.d create mode 100644 generated/gdl/gdl/DockPaned.d create mode 100644 generated/gdl/gdl/DockParam.d create mode 100644 generated/gdl/gdl/DockPlaceholder.d create mode 100644 generated/gdl/gdl/DockTablabel.d create mode 100644 generated/gdl/gdl/PreviewWindow.d create mode 100644 generated/gdl/gdl/Switcher.d create mode 100644 generated/gdl/gdl/c/functions.d create mode 100644 generated/gdl/gdl/c/types.d create mode 100644 generated/gdl/gdlc/gdl.d create mode 100644 generated/gdl/gdlc/gdltypes.d create mode 100644 src/APILookupGdl.txt create mode 100644 src/gdlc/gdl.d create mode 100644 src/gdlc/gdltypes.d diff --git a/Build.d b/Build.d index 71994121c..e7b23b0cf 100755 --- a/Build.d +++ b/Build.d @@ -76,7 +76,7 @@ int main(string[] args) foreach ( arg; args ) { - if ( !["gtkd", "gtkdgl", "sv", "gstreamer", "vte", "peas", "all"].canFind(arg) ) + if ( !["gtkd", "gtkdgl", "sv", "gstreamer", "vte", "peas", "gdl", "all"].canFind(arg) ) { writefln("Unknown option: %s", arg); return 1; @@ -87,7 +87,7 @@ int main(string[] args) args = ["gtkd", "sv"]; if ( args.canFind("all") ) - args = ["gtkd", "sv", "gstreamer", "peas"]; + args = ["gtkd", "sv", "gstreamer", "peas", "gdl"]; foreach ( arg; args ) { @@ -108,6 +108,9 @@ int main(string[] args) case "peas": build("generated\\peas", "peasd"); break; + case "gdl": + build("generated\\gdl", "gdld"); + break; default: assert(false); break; diff --git a/GNUmakefile b/GNUmakefile index 23629e1b9..e6e7ef760 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -121,6 +121,12 @@ SOURCES_PEASD = $(wildcard generated/peas/*/*.d) $(wildcard generated/peas/*/c/* OBJECTS_PEASD = $(patsubst %.d,%.o,$(SOURCES_PEASD)) PICOBJECTS_PEASD = $(patsubst %.o,%.pic.o,$(OBJECTS_PEASD)) +LIBNAME_GDLD = libgdld-$(MAJOR).a +SONAME_GDLD = libgdld-$(MAJOR).$(SO_POSTFIX) +SOURCES_GDLD = $(wildcard generated/gdl/*/*.d) $(wildcard generated/gdl/*/c/*.d) +OBJECTS_GDLD = $(patsubst %.d,%.o,$(SOURCES_GDLD)) +PICOBJECTS_GDLD = $(patsubst %.o,%.pic.o,$(OBJECTS_GDLD)) + ####################################################################### USE_RUNTIME_LINKER = $(shell grep "Linker" generated/gtkd/atk/c/functions.d) @@ -132,6 +138,7 @@ ifeq ($(USE_RUNTIME_LINKER),) SOFLAGS_GSTREAMERD = $(LINKERFLAG)-L. $(LINKERFLAG)./libgtkd-$(MAJOR).$(SO_POSTFIX) $(shell ${PKG_CONFIG} --libs-only-l --libs-only-L gstreamer-base-1.0 | sed 's/-[lL]/$(LINKERFLAG)&/g') SOFLAGS_VTED = $(LINKERFLAG)-L. $(LINKERFLAG)./libgtkd-$(MAJOR).$(SO_POSTFIX) $(shell ${PKG_CONFIG} --libs-only-l --libs-only-L vte-2.91 | sed 's/-[lL]/$(LINKERFLAG)&/g') SOFLAGS_PEASD = $(LINKERFLAG)-L. $(LINKERFLAG)./libgtkd-$(MAJOR).$(SO_POSTFIX) $(shell ${PKG_CONFIG} --libs-only-l --libs-only-L libpeas-1.0 | sed -e 's/-[lL]/$(LINKERFLAG)&/g') + SOFLAGS_GDLD = $(LINKERFLAG)-L. $(LINKERFLAG)./libgtkd-$(MAJOR).$(SO_POSTFIX) $(shell ${PKG_CONFIG} --libs-only-l --libs-only-L gdl-3.0 | sed -e 's/-[lL]/$(LINKERFLAG)&/g') endif ####################################################################### @@ -171,8 +178,8 @@ ifeq ("$(OS)","Darwin") libs: gtkd shared-libs: shared-gtkd else - libs: gtkd sv gstreamer vte peas - shared-libs: shared-gtkd shared-sv shared-gstreamer shared-vte shared-peas + libs: gtkd sv gstreamer vte peas gdl + shared-libs: shared-gtkd shared-sv shared-gstreamer shared-vte shared-peas shared-gdl endif gtkd: $(LIBNAME_GTKD) @@ -181,6 +188,7 @@ sv: $(LIBNAME_GTKDSV) gstreamer: $(LIBNAME_GSTREAMERD) vte: $(LIBNAME_VTED) peas: $(LIBNAME_PEASD) +gdl: $(LIBNAME_GDLD) shared-gtkd: $(SONAME_GTKD) shared-gtkdgl: $(SONAME_GTKDGL) @@ -188,6 +196,7 @@ shared-sv: $(SONAME_GTKDSV) shared-gstreamer: $(SONAME_GSTREAMERD) shared-vte: $(SONAME_VTED) shared-peas: $(SONAME_PEASD) +shared-gdl: $(SONAME_GDLD) ####################################################################### @@ -215,6 +224,10 @@ $(LIBNAME_PEASD): IMPORTS=-Igenerated/gtkd -Igenerated/peas $(LIBNAME_PEASD): $(LIBNAME_GTKD) $(OBJECTS_PEASD) $(make-lib) +$(LIBNAME_GDLD): IMPORTS=-Igenerated/gtkd -Igenerated/gdl +$(LIBNAME_GDLD): $(LIBNAME_GTKD) $(OBJECTS_GDLD) + $(make-lib) + ####################################################################### $(SONAME_GTKD): IMPORTS=-Igenerated/gtkd @@ -241,6 +254,10 @@ $(SONAME_PEASD): IMPORTS=-Igenerated/gtkd -Igenerated/peas $(SONAME_PEASD): $(SONAME_GTKD) $(PICOBJECTS_PEASD) $(call make-shared-lib,$(SOFLAGS_PEASD)) +$(SONAME_GDLD): IMPORTS=-Igenerated/gtkd -Igenerated/gdl +$(SONAME_GDLD): $(SONAME_GTKD) $(PICOBJECTS_GDLD) + $(call make-shared-lib,$(SOFLAGS_GDLD)) + ####################################################################### # -Idemos @@ -284,6 +301,7 @@ pkgconfig-sv: gtkdsv-$(MAJOR).pc pkgconfig-gstreamer: gstreamerd-$(MAJOR).pc pkgconfig-vte: vted-$(MAJOR).pc pkgconfig-peas: peasd-$(MAJOR).pc +pkgconfig-gdl: gdld-$(MAJOR).pc gtkd-$(MAJOR).pc: echo Name: GtkD > $@ @@ -328,6 +346,13 @@ peasd-$(MAJOR).pc: echo Libs: $(LINKERFLAG)-lpeasd-$(MAJOR) >> $@ echo Requires: gtkd-$(MAJOR), libpeas-1.0, libpeas-gtk-1.0 >> $@ +gdld-$(MAJOR).pc: + echo Name: GdlD > $@ + echo Description: A D binding and OO wrapper for Gnome Docking library. >> $@ + echo Version: $(GTKD_VERSION) >> $@ + echo Libs: $(LINKERFLAG)-lgdld-$(MAJOR) >> $@ + echo Requires: gtkd-$(MAJOR), gdl-3.0 >> $@ + ####################################################################### ifeq ("$(OS)","Darwin") @@ -335,9 +360,9 @@ ifeq ("$(OS)","Darwin") install-headers: install-headers-gtkd install-shared: install-shared-gtkd else - install: install-gtkd install-gtkdsv install-gstreamer install-vte install-peas - install-headers: install-headers-gtkd install-headers-gtkdsv install-headers-gstreamer install-headers-vte install-headers-peas - install-shared: install-shared-gtkd install-shared-gtkdsv install-shared-gstreamer install-shared-vte install-shared-peas + install: install-gtkd install-gtkdsv install-gstreamer install-vte install-peas install-gdl + install-headers: install-headers-gtkd install-headers-gtkdsv install-headers-gstreamer install-headers-vte install-headers-peas install-headers-gdl + install-shared: install-shared-gtkd install-shared-gtkdsv install-shared-gstreamer install-shared-vte install-shared-peas install-shared-gdl endif install-gtkd: $(LIBNAME_GTKD) install-headers-gtkd @@ -359,6 +384,9 @@ install-vte: $(LIBNAME_VTED) install-gtkd install-headers-vte install-peas: $(LIBNAME_PEASD) install-gtkd install-headers-peas install -m 644 $(LIBNAME_PEASD) $(DESTDIR)$(prefix)/$(libdir) +install-gdl: $(LIBNAME_GDLD) install-gtkd install-headers-gdl + install -m 644 $(LIBNAME_GDLD) $(DESTDIR)$(prefix)/$(libdir) + install-shared-gtkd: $(SONAME_GTKD) install -d $(DESTDIR)$(prefix)/$(libdir) $(install-so) @@ -404,7 +432,11 @@ install-headers-peas: peasd-$(MAJOR).pc install-headers-gtkd (cd generated/peas; echo $(SOURCES_PEASD) | sed -e s,generated/peas/,,g | xargs tar cf -) | (cd $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR); tar xvf -) install -m 644 peasd-$(MAJOR).pc $(DESTDIR)$(prefix)/$(pkgconfigdir) -uninstall: uninstall-gtkdgl uninstall-gtkdsv uninstall-gstreamer uninstall-vte uninstall-peas +install-headers-gdl: gdld-$(MAJOR).pc install-headers-gtkd + (cd generated/gdl; echo $(SOURCES_GDLD) | sed -e s,generated/gdl/,,g | xargs tar cf -) | (cd $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR); tar xvf -) + install -m 644 gdld-$(MAJOR).pc $(DESTDIR)$(prefix)/$(pkgconfigdir) + +uninstall: uninstall-gtkdgl uninstall-gtkdsv uninstall-gstreamer uninstall-vte uninstall-peas uninstall-gdl $(foreach dir,$(shell ls generated/gtkd) , rm -rf $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR)/$(dir)) rm -f $(DESTDIR)$(prefix)/$(pkgconfigdir)/gtkd-$(MAJOR).pc rm -f $(DESTDIR)$(prefix)/$(libdir)/$(LIBNAME_GTKD) @@ -452,6 +484,14 @@ uninstall-peas: rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_PEASD).$(SO_VERSION) rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_PEASD).$(SO_VERSION).$(MINOR).$(BUGFIX) +uninstall-gdl: + $(foreach dir,$(shell ls generated/gdl), rm -rf $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR)/$(dir)) + rm -f $(DESTDIR)$(prefix)/$(pkgconfigdir)/gdld-$(MAJOR).pc + rm -f $(DESTDIR)$(prefix)/$(libdir)/$(LIBNAME_GDLD) + rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_GDLD) + rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_GDLD).$(SO_VERSION) + rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_GDLD).$(SO_VERSION).$(MINOR).$(BUGFIX) + clean: -rm -f $(LIBNAME_GTKD) $(SONAME_GTKD) gtkd-$(MAJOR).pc $(OBJECTS_GTKD) $(PICOBJECTS_GTKD) -rm -f $(LIBNAME_GTKDGL) $(SONAME_GTKDGL) gtkdgl-$(MAJOR).pc $(OBJECTS_GTKDGL) $(PICOBJECTS_GTKDGL) @@ -459,6 +499,7 @@ clean: -rm -f $(LIBNAME_GSTREAMERD) $(SONAME_GSTREAMERD) gstreamerd-$(MAJOR).pc $(OBJECTS_GSTREAMERD) $(PICOBJECTS_GSTREAMERD) -rm -f $(LIBNAME_VTED) $(SONAME_VTED) vted-$(MAJOR).pc $(OBJECTS_VTED) $(PICOBJECTS_VTED) -rm -f $(LIBNAME_PEASD) $(SONAME_PEASD) peasd-$(MAJOR).pc $(OBJECTS_PEASD) $(PICOBJECTS_PEASD) + -rm -f $(LIBNAME_GDLD) $(SONAME_GDLD) gdld-$(MAJOR).pc $(OBJECTS_GDLD) $(PICOBJECTS_GDLD) -rm -f $(BINNAME_DEMO) $(OBJECTS_DEMO) $(SONAME_GTKD).$(SO_VERSION) -$(MAKE) -C wrap clean diff --git a/README.md b/README.md index a7342fc22..51e468c06 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,7 @@ shared | build all the shared libraries. [shared-]gstreamer | build gstreamer. [shared-]vte | build vte. [shared-]peas | build peas. +[shared-]gdl | build gdl. install and uninstall options are also available for the options mentioned above. diff --git a/demos/gtkD/DemoGdl/DemoGdl.d b/demos/gtkD/DemoGdl/DemoGdl.d new file mode 100644 index 000000000..5540f541e --- /dev/null +++ b/demos/gtkD/DemoGdl/DemoGdl.d @@ -0,0 +1,76 @@ +module demos.gtkD.DemoGdl.DemoGdl; + +/* + * 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 3 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., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +/***************************************************************************** + +Authors: Jan Jurzita + +This demo shows the Gnome Docking library in action. + +*****************************************************************************/ + +import gtk.Application : Application; +import gio.Application : GioApplication = Application; +import gtk.ApplicationWindow : ApplicationWindow; + +import gtk.Button; +import gtk.DrawingArea; + +import gdl.DockItem; +import gdl.Dock; + +import TestDrawingArea; + +class MainWindow : ApplicationWindow { + + this(Application application) { + super(application); + initUI(); + showAll(); + } + + /** + * Create and initialize the GTK widgets + */ + private void initUI() { + this.setSizeRequest(1024, 640); + + Dock dock = new Dock; + DockItem item2 = new DockItem("Drawing Area", "Drawing Area", + GdlDockItemBehavior.LOCKED + | GdlDockItemBehavior.CANT_CLOSE + | GdlDockItemBehavior.NO_GRIP); + item2.add(new TestDrawingArea()); + dock.addItem(item2, GdlDockPlacement.CENTER); + DockItem item = new DockItem("Toolbox", "Toolbox", GdlDockItemBehavior.NORMAL); + item.add(new Button("Toolbox 1")); + dock.addItem(item, GdlDockPlacement.LEFT); + DockItem item3 = new DockItem("TBox3", "Long Toolbox 3 Name", GdlDockItemBehavior.NORMAL); + item3.add(new Button("Toolbox 3")); + dock.addItem(item3, GdlDockPlacement.BOTTOM); + add(dock); + } +} + +int main(string[] args) { + auto application = new Application("demo.gtkd.GDL", GApplicationFlags.FLAGS_NONE); + application.addOnActivate(delegate void(GioApplication app) { MainWindow mainWindow = new MainWindow(application); }); + return application.run(args); +} diff --git a/demos/gtkD/DemoGdl/dub.json b/demos/gtkD/DemoGdl/dub.json new file mode 100644 index 000000000..3aed6bede --- /dev/null +++ b/demos/gtkD/DemoGdl/dub.json @@ -0,0 +1,10 @@ +{ + "name": "demo_gdl", + "description": "A Actions demo", + "targetType": "executable", + "sourceFiles": ["DemoGdl.d", "../_shared/TestDrawingArea.d"], + "dependencies": { + "gtk-d:gtkd": {"path": "../../../" }, + "gtk-d:gdl": {"path": "../../../" } + } +} diff --git a/demos/gtkD/TestWindow/dub.json b/demos/gtkD/TestWindow/dub.json index c4226b0bf..53ff01d86 100644 --- a/demos/gtkD/TestWindow/dub.json +++ b/demos/gtkD/TestWindow/dub.json @@ -6,7 +6,8 @@ "sourceFiles": ["TestEntries.d", "TestStock.d", "TestTreeView.d", "TEditableCells.d", "TestIdle.d", "TestText.d", "TestWindow.d", "TestAspectFrame.d", "TestImage.d", - "TestThemes.d", "TTextView.d", "TestDrawingArea.d", + "TestThemes.d", "TTextView.d", + "../_shared/TestDrawingArea.d", "TestScales.d", "TestTreeView1.d"], "dependencies": { "gtk-d:gtkd": {"path": "../../../" }, diff --git a/demos/gtkD/TestWindow/TestDrawingArea.d b/demos/gtkD/_shared/TestDrawingArea.d similarity index 100% rename from demos/gtkD/TestWindow/TestDrawingArea.d rename to demos/gtkD/_shared/TestDrawingArea.d diff --git a/docs/candydoc/explorer.js b/docs/candydoc/explorer.js index 42bbc9f28..e269c71cb 100644 --- a/docs/candydoc/explorer.js +++ b/docs/candydoc/explorer.js @@ -236,6 +236,8 @@ function PackageExplorer() node.setRef("../../vte/" + path.join("/") + ".html"); } else if ((path[0] == "peas") || (path[0] == "peasc")) { node.setRef("../../peas/" + path.join("/") + ".html"); + } else if ((path[0] == "gdl") || (path[0] == "gdlc")) { + node.setRef("../../gdl/" + path.join("/") + ".html"); } else { node.setRef("../../gtkd/" + path.join("/") + ".html"); } diff --git a/dub.json b/dub.json index c1e26c5e0..24f916976 100644 --- a/dub.json +++ b/dub.json @@ -20,7 +20,8 @@ "gtk-d:vte": "*", "gtk-d:gtkd": "*", "gtk-d:gstreamer": "*", - "gtk-d:peas": "*" + "gtk-d:peas": "*", + "gtk-d:gdl": "*" }, "subPackages" : [ @@ -76,6 +77,15 @@ "libs-posix": ["dl"], "importPaths": ["generated/peas"], "dependencies": {"gtk-d:gtkd":"*"} + }, + { + "name": "gdl", + "targetType": "library", + "targetName": "gdld-3", + "sourcePaths": ["generated/gdl"], + "libs-posix": ["dl"], + "importPaths": ["generated/gdl"], + "dependencies": {"gtk-d:gtkd":"*"} } ] } diff --git a/generated/gdl/gdl/Dock.d b/generated/gdl/gdl/Dock.d new file mode 100644 index 000000000..4a3f7137c --- /dev/null +++ b/generated/gdl/gdl/Dock.d @@ -0,0 +1,290 @@ +/* + * 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 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gdl.Dock; + +private import gdl.DockItem; +private import gdl.DockObject; +private import gdl.DockPlaceholder; +private import gdl.c.functions; +public import gdl.c.types; +private import glib.ConstructionException; +private import glib.ListG; +private import glib.Str; +private import gobject.ObjectG; +private import gobject.Signals; +private import gtk.Widget; +private import std.algorithm; + + +/** */ +public class Dock : DockObject +{ + /** the main Gtk struct */ + protected GdlDock* gdlDock; + + /** Get the main Gtk struct */ + public GdlDock* getDockStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return gdlDock; + } + + /** the main Gtk struct as a void* */ + protected override void* getStruct() + { + return cast(void*)gdlDock; + } + + /** + * Sets our main struct and passes it to the parent class. + */ + public this (GdlDock* gdlDock, bool ownedRef = false) + { + this.gdlDock = gdlDock; + super(cast(GdlDockObject*)gdlDock, ownedRef); + } + + + /** */ + public static GType getType() + { + return gdl_dock_get_type(); + } + + /** + * Create a new dock. + * + * Returns: A new #GdlDock widget. + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this() + { + auto __p = gdl_dock_new(); + + if(__p is null) + { + throw new ConstructionException("null returned by new"); + } + + this(cast(GdlDock*) __p, true); + } + + /** + * Dock an item as a floating item. It creates a new window containing a new + * dock widget sharing the same master where the item is docked. + * + * Params: + * item = A #GdlDockItem widget + * x = X coordinate of the floating item + * y = Y coordinate of the floating item + * width = width of the floating item + * height = height of the floating item + */ + public void addFloatingItem(DockItem item, int x, int y, int width, int height) + { + gdl_dock_add_floating_item(gdlDock, (item is null) ? null : item.getDockItemStruct(), x, y, width, height); + } + + /** + * Dock in @dock, the widget @item at the position defined by @placement. The + * function takes care of finding the right parent widget eventually creating + * it if needed. + * + * Params: + * item = A #GdlDockItem widget + * placement = A position for the widget + */ + public void addItem(DockItem item, GdlDockPlacement placement) + { + gdl_dock_add_item(gdlDock, (item is null) ? null : item.getDockItemStruct(), placement); + } + + /** + * Looks for an #GdlDockItem widget bound to the master of the dock item. It + * does not search only in the children of this particular dock widget. + * + * Params: + * name = An item name + * + * Returns: A #GdlDockItem widget or %NULL + */ + public DockItem getItemByName(string name) + { + auto __p = gdl_dock_get_item_by_name(gdlDock, Str.toStringz(name)); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(DockItem)(cast(GdlDockItem*) __p); + } + + /** + * Returns a list of all item bound to the master of the dock, not only + * the children of this particular dock widget. + * + * Returns: A list of #GdlDockItem. The list should be freedwith g_list_free(), + * but the item still belong to the master. + */ + public ListG getNamedItems() + { + auto __p = gdl_dock_get_named_items(gdlDock); + + if(__p is null) + { + return null; + } + + return new ListG(cast(GList*) __p); + } + + /** + * Looks for an #GdlDockPlaceholder object bound to the master of the dock item. + * It does not search only in the children of this particular dock widget. + * + * Deprecated: This function is always returning %NULL. + * + * Params: + * name = An item name + * + * Returns: A #GdlDockPlaceholder object or %NULL + */ + public DockPlaceholder getPlaceholderByName(string name) + { + auto __p = gdl_dock_get_placeholder_by_name(gdlDock, Str.toStringz(name)); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(DockPlaceholder)(cast(GdlDockPlaceholder*) __p); + } + + /** + * Get the first child of the #GdlDockObject. + * + * Returns: A #GdlDockObject or %NULL. + */ + public DockObject getRoot() + { + auto __p = gdl_dock_get_root(gdlDock); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(DockObject)(cast(GdlDockObject*) __p); + } + + /** + * Hide the preview window used to materialize the dock target. + */ + public void hidePreview() + { + gdl_dock_hide_preview(gdlDock); + } + + /** + * Create a new dock widget having the same master than @original. + * + * Params: + * floating = %TRUE to create a floating dock + * + * Returns: A new #GdlDock widget + */ + public Widget newFrom(bool floating) + { + auto __p = gdl_dock_new_from(gdlDock, floating); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Widget)(cast(GtkWidget*) __p, true); + } + + /** + * Sets whether or not a floating dock window should be prevented from + * appearing in the system taskbar. + * + * Params: + * skip = %TRUE if floating docks should be prevented from appearing in the taskbar + * + * Since: 3.6 + */ + public void setSkipTaskbar(bool skip) + { + gdl_dock_set_skip_taskbar(gdlDock, skip); + } + + /** + * Show a preview window used to materialize the dock target. + * + * Params: + * rect = The position and the size of the preview window + */ + public void showPreview(GdkRectangle* rect) + { + gdl_dock_show_preview(gdlDock, rect); + } + + /** + * Show a preview window used to materialize the dock target. + * + * Deprecated: Use gdl_dock_show_preview instead. + * + * Params: + * rect = The position and the size of the preview window + */ + public void xorRect(GdkRectangle* rect) + { + gdl_dock_xor_rect(gdlDock, rect); + } + + /** + * Hide the preview window used to materialize the dock target. + * + * Deprecated: Use gdl_dock_hide_preview instead. + */ + public void xorRectHide() + { + gdl_dock_xor_rect_hide(gdlDock); + } + + /** + * Signals that the layout has changed, one or more widgets have been moved, + * added or removed. + */ + gulong addOnLayoutChanged(void delegate(Dock) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) + { + return Signals.connect(this, "layout-changed", dlg, connectFlags ^ ConnectFlags.SWAPPED); + } +} diff --git a/generated/gdl/gdl/DockBar.d b/generated/gdl/gdl/DockBar.d new file mode 100644 index 000000000..837b37f17 --- /dev/null +++ b/generated/gdl/gdl/DockBar.d @@ -0,0 +1,143 @@ +/* + * 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 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gdl.DockBar; + +private import gdl.c.functions; +public import gdl.c.types; +private import glib.ConstructionException; +private import gobject.ObjectG; +private import gtk.Box; +private import gtk.BuildableIF; +private import gtk.BuildableT; +private import gtk.OrientableIF; +private import gtk.OrientableT; +private import gtk.Widget; + + +/** */ +public class DockBar : Box +{ + /** the main Gtk struct */ + protected GdlDockBar* gdlDockBar; + + /** Get the main Gtk struct */ + public GdlDockBar* getDockBarStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return gdlDockBar; + } + + /** the main Gtk struct as a void* */ + protected override void* getStruct() + { + return cast(void*)gdlDockBar; + } + + /** + * Sets our main struct and passes it to the parent class. + */ + public this (GdlDockBar* gdlDockBar, bool ownedRef = false) + { + this.gdlDockBar = gdlDockBar; + super(cast(GtkBox*)gdlDockBar, ownedRef); + } + + + /** */ + public static GType getType() + { + return gdl_dock_bar_get_type(); + } + + /** + * Creates a new GDL dock bar. If a #GdlDockObject is used, the dock bar will + * be associated with the master of this object. + * + * Params: + * master = The associated #GdlDockMaster or #GdlDockObject object + * + * Returns: The newly created dock bar. + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this(ObjectG master) + { + auto __p = gdl_dock_bar_new((master is null) ? null : master.getObjectGStruct()); + + if(__p is null) + { + throw new ConstructionException("null returned by new"); + } + + this(cast(GdlDockBar*) __p); + } + + /** + * Retrieves the orientation of the @dockbar. + * + * Deprecated: Use gtk_orientable_get_orientation() instead. + * + * Returns: the orientation of the @docbar + */ + public override GtkOrientation getOrientation() + { + return gdl_dock_bar_get_orientation(gdlDockBar); + } + + /** + * Retrieves the style of the @dockbar. + * + * Returns: the style of the @docbar + */ + public GdlDockBarStyle getDockBarStyle() + { + return gdl_dock_bar_get_style(gdlDockBar); + } + + /** + * Set the orientation of the @dockbar. + * + * Deprecated: Use gtk_orientable_set_orientation() instead. + * + * Params: + * orientation = the new orientation + */ + public override void setOrientation(GtkOrientation orientation) + { + gdl_dock_bar_set_orientation(gdlDockBar, orientation); + } + + /** + * Set the style of the @dockbar. + * + * Params: + * style = the new style + */ + public void setStyle(GdlDockBarStyle style) + { + gdl_dock_bar_set_style(gdlDockBar, style); + } +} diff --git a/generated/gdl/gdl/DockItem.d b/generated/gdl/gdl/DockItem.d new file mode 100644 index 000000000..64de07635 --- /dev/null +++ b/generated/gdl/gdl/DockItem.d @@ -0,0 +1,585 @@ +/* + * 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 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gdl.DockItem; + +private import gdk.Device; +private import gdkpixbuf.Pixbuf; +private import gdl.DockObject; +private import gdl.c.functions; +public import gdl.c.types; +private import glib.ConstructionException; +private import glib.Str; +private import gobject.ObjectG; +private import gobject.Signals; +private import gtk.Requisition; +private import gtk.Widget; +private import std.algorithm; + + +/** */ +public class DockItem : DockObject +{ + /** the main Gtk struct */ + protected GdlDockItem* gdlDockItem; + + /** Get the main Gtk struct */ + public GdlDockItem* getDockItemStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return gdlDockItem; + } + + /** the main Gtk struct as a void* */ + protected override void* getStruct() + { + return cast(void*)gdlDockItem; + } + + /** + * Sets our main struct and passes it to the parent class. + */ + public this (GdlDockItem* gdlDockItem, bool ownedRef = false) + { + this.gdlDockItem = gdlDockItem; + super(cast(GdlDockObject*)gdlDockItem, ownedRef); + } + + + /** */ + public static GType getType() + { + return gdl_dock_item_get_type(); + } + + /** + * Creates a new dock item widget. + * + * Params: + * name = Unique name for identifying the dock object. + * longName = Human readable name for the dock object. + * behavior = General behavior for the dock item (i.e. whether it can + * float, if it's locked, etc.), as specified by + * #GdlDockItemBehavior flags. + * + * Returns: The newly created dock item grip widget. + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this(string name, string longName, GdlDockItemBehavior behavior) + { + auto __p = gdl_dock_item_new(Str.toStringz(name), Str.toStringz(longName), behavior); + + if(__p is null) + { + throw new ConstructionException("null returned by new"); + } + + this(cast(GdlDockItem*) __p); + } + + /** + * Creates a new dock item grip widget with a given pixbuf icon. + * + * Params: + * name = Unique name for identifying the dock object. + * longName = Human readable name for the dock object. + * pixbufIcon = Pixbuf icon for the dock object. + * behavior = General behavior for the dock item (i.e. whether it can + * float, if it's locked, etc.), as specified by + * #GdlDockItemBehavior flags. + * + * Returns: The newly created dock item grip widget. + * + * Since: 3.3.2 + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this(string name, string longName, Pixbuf pixbufIcon, GdlDockItemBehavior behavior) + { + auto __p = gdl_dock_item_new_with_pixbuf_icon(Str.toStringz(name), Str.toStringz(longName), (pixbufIcon is null) ? null : pixbufIcon.getPixbufStruct(), behavior); + + if(__p is null) + { + throw new ConstructionException("null returned by new_with_pixbuf_icon"); + } + + this(cast(GdlDockItem*) __p); + } + + /** + * Creates a new dock item grip widget with a given stock id. + * + * Params: + * name = Unique name for identifying the dock object. + * longName = Human readable name for the dock object. + * stockId = Stock icon for the dock object. + * behavior = General behavior for the dock item (i.e. whether it can + * float, if it's locked, etc.), as specified by + * #GdlDockItemBehavior flags. + * + * Returns: The newly created dock item grip widget. + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this(string name, string longName, string stockId, GdlDockItemBehavior behavior) + { + auto __p = gdl_dock_item_new_with_stock(Str.toStringz(name), Str.toStringz(longName), Str.toStringz(stockId), behavior); + + if(__p is null) + { + throw new ConstructionException("null returned by new_with_stock"); + } + + this(cast(GdlDockItem*) __p); + } + + /** + * Binds this dock item to a new dock master. + * + * Params: + * dock = The #GdlDock widget to bind it to. Note that this widget must + * be a type of #GdlDock. + */ + public void bindTo(Widget dock) + { + gdl_dock_item_bind(gdlDockItem, (dock is null) ? null : dock.getWidgetStruct()); + } + + /** + * Relocates a dock item to a new location relative to another dock item. + * + * Params: + * target = The dock item that will be used as the point of reference. + * position = The position to dock #item, relative to #target. + * dockingParam = This value is unused, and will be ignored. + */ + public void dockTo(DockItem target, GdlDockPlacement position, int dockingParam) + { + gdl_dock_item_dock_to(gdlDockItem, (target is null) ? null : target.getDockItemStruct(), position, dockingParam); + } + + /** + * Retrieves the behavior of the item. + * + * Returns: the behavior of the item. + * + * Since: 3.6 + */ + public GdlDockItemBehavior getBehaviorFlags() + { + return gdl_dock_item_get_behavior_flags(gdlDockItem); + } + + /** + * Gets the child of the #GdlDockItem, or %NULL if the item contains + * no child widget. The returned widget does not have a reference + * added, so you do not need to unref it. + * + * Returns: pointer to child of the #GdlDockItem + * + * Since: 3.6 + */ + public Widget getChild() + { + auto __p = gdl_dock_item_get_child(gdlDockItem); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Widget)(cast(GtkWidget*) __p); + } + + /** + * Gets the size and the position of the drag window in pixels. + * + * Params: + * rect = A pointer to a #GdkRectangle that will receive the drag position + * + * Since: 3.6 + */ + public void getDragArea(GdkRectangle* rect) + { + gdl_dock_item_get_drag_area(gdlDockItem, rect); + } + + /** + * This function returns the dock item's grip label widget. + * + * Returns: Returns the current label widget. + */ + public Widget getGrip() + { + auto __p = gdl_dock_item_get_grip(gdlDockItem); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Widget)(cast(GtkWidget*) __p); + } + + /** + * Retrieves the orientation of the object. + * + * Returns: the orientation of the object. + * + * Since: 3.6 + */ + public GtkOrientation getOrientation() + { + return gdl_dock_item_get_orientation(gdlDockItem); + } + + /** + * Gets the current tab label widget. Note that this label widget is + * only visible when the "switcher-style" property of the #GdlDockMaster + * is set to #GDL_SWITCHER_STYLE_TABS + * + * Returns: Returns the tab label widget. + */ + public Widget getTablabel() + { + auto __p = gdl_dock_item_get_tablabel(gdlDockItem); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Widget)(cast(GtkWidget*) __p); + } + + /** + * This function hides the dock item's grip widget. + */ + public void hideGrip() + { + gdl_dock_item_hide_grip(gdlDockItem); + } + + /** + * This function hides the dock item. Since version 3.6, when dock items + * are hidden they are not removed from the layout. + * + * The dock item close button causes the panel to be hidden. + */ + public void hideItem() + { + gdl_dock_item_hide_item(gdlDockItem); + } + + /** + * This function iconifies the dock item. When dock items are iconified + * they are hidden, and appear only as icons in dock bars. + * + * The dock item iconify button causes the panel to be iconified. + */ + public void iconifyItem() + { + gdl_dock_item_iconify_item(gdlDockItem); + } + + /** + * Checks whether a given #GdlDockItem is closed. It can be only hidden or + * detached. + * + * Returns: %TRUE if the dock item is closed. + * + * Since: 3.6 + */ + public override bool isClosed() + { + return gdl_dock_item_is_closed(gdlDockItem) != 0; + } + + /** + * Checks whether a given #GdlDockItem is iconified. + * + * Returns: %TRUE if the dock item is iconified. + * + * Since: 3.6 + */ + public bool isIconified() + { + return gdl_dock_item_is_iconified(gdlDockItem) != 0; + } + + /** + * Checks whether a given #GdlDockItem is a placeholder created by the + * #GdlDockLayout object and does not contain a child. + * + * Returns: %TRUE if the dock item is a placeholder + * + * Since: 3.6 + */ + public bool isPlaceholder() + { + return gdl_dock_item_is_placeholder(gdlDockItem) != 0; + } + + /** + * This function locks the dock item. When locked the dock item cannot + * be dragged around and it doesn't show a grip. + */ + public void lock() + { + gdl_dock_item_lock(gdlDockItem); + } + + /** + * This function emits the deselected signal. It is used by #GdlSwitcher + * to let clients know that this item has been deselected. + */ + public void notifyDeselected() + { + gdl_dock_item_notify_deselected(gdlDockItem); + } + + /** + * This function emits the selected signal. It is to be used by #GdlSwitcher + * to let clients know that this item has been switched to. + */ + public void notifySelected() + { + gdl_dock_item_notify_selected(gdlDockItem); + } + + /** + * Checks whether a given #GdlDockItem or its child widget has focus. + * This check is performed recursively on child widgets. + * + * Returns: %TRUE if the dock item or its child widget has focus; + * %FALSE otherwise. + * + * Since: 3.3.2 + */ + public bool orChildHasFocus() + { + return gdl_dock_item_or_child_has_focus(gdlDockItem) != 0; + } + + /** + * Gets the preferred size of the dock item in pixels. + * + * Params: + * req = A pointer to a #GtkRequisition into which the preferred size + * will be written. + */ + public void preferredSize(Requisition req) + { + gdl_dock_item_preferred_size(gdlDockItem, (req is null) ? null : req.getRequisitionStruct()); + } + + /** + * This function sets the behavior of the dock item. + * + * Params: + * behavior = Behavior flags to turn on + * clear = Whether to clear state before turning on @flags + * + * Since: 3.6 + */ + public void setBehaviorFlags(GdlDockItemBehavior behavior, bool clear) + { + gdl_dock_item_set_behavior_flags(gdlDockItem, behavior, clear); + } + + /** + * Set a new child for the #GdlDockItem. This child is different from the + * children using the #GtkContainer interface. It is a private child reserved + * for the widget implementation. + * + * If a child is already present, it will be replaced. If @widget is %NULL the + * child will be removed. + * + * Params: + * child = a #GtkWidget + * + * Since: 3.6 + */ + public void setChild(Widget child) + { + gdl_dock_item_set_child(gdlDockItem, (child is null) ? null : child.getWidgetStruct()); + } + + /** + * This method has only an effect when you add you dock_item with + * GDL_DOCK_ITEM_BEH_NEVER_FLOATING. In this case you have to assign + * it a default position.* + * + * Deprecated 3.6: This function is doing nothing now. + * + * Params: + * reference = The GdlDockObject which is the default dock for @item + */ + public void setDefaultPosition(DockObject reference) + { + gdl_dock_item_set_default_position(gdlDockItem, (reference is null) ? null : reference.getDockObjectStruct()); + } + + /** + * This function sets the layout of the dock item. + * + * Params: + * orientation = The orientation to set the item to. If the orientation + * is set to #GTK_ORIENTATION_VERTICAL, the grip widget will be shown + * along the top of the edge of item (if it is not hidden). If the + * orientation is set to #GTK_ORIENTATION_HORIZONTAL, the grip widget + * will be shown down the left edge of the item (even if the widget + * text direction is set to RTL). + */ + public void setOrientation(GtkOrientation orientation) + { + gdl_dock_item_set_orientation(gdlDockItem, orientation); + } + + /** + * Replaces the current tab label widget with another widget. Note that + * this label widget is only visible when the "switcher-style" property + * of the #GdlDockMaster is set to #GDL_SWITCHER_STYLE_TABS + * + * Params: + * tablabel = The widget that will become the tab label. + */ + public void setTablabel(Widget tablabel) + { + gdl_dock_item_set_tablabel(gdlDockItem, (tablabel is null) ? null : tablabel.getWidgetStruct()); + } + + /** + * This function shows the dock item's grip widget. + */ + public void showGrip() + { + gdl_dock_item_show_grip(gdlDockItem); + } + + /** + * This function shows the dock item. When dock items are shown, they + * are displayed in their normal layout position. + */ + public void showItem() + { + gdl_dock_item_show_item(gdlDockItem); + } + + /** + * Unbinds this dock item from it's dock master. + */ + public override void unbind() + { + gdl_dock_item_unbind(gdlDockItem); + } + + /** + * This function unlocks the dock item. When unlocked the dock item can + * be dragged around and can show a grip. + */ + public void unlock() + { + gdl_dock_item_unlock(gdlDockItem); + } + + /** + * This function sets the behavior of the dock item. + * + * Params: + * behavior = Behavior flags to turn off + * + * Since: 3.6 + */ + public void unsetBehaviorFlags(GdlDockItemBehavior behavior) + { + gdl_dock_item_unset_behavior_flags(gdlDockItem, behavior); + } + + /** + * Signals that this dock has been deselected in a switcher. + */ + gulong addOnDeselected(void delegate(DockItem) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) + { + return Signals.connect(this, "deselected", dlg, connectFlags ^ ConnectFlags.SWAPPED); + } + + /** + * Signals that the dock item has begun to be dragged. + */ + gulong addOnDockDragBegin(void delegate(DockItem) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) + { + return Signals.connect(this, "dock-drag-begin", dlg, connectFlags ^ ConnectFlags.SWAPPED); + } + + /** + * Signals that the dock item dragging has ended. + * + * Params: + * cancel = This value is set to TRUE if the drag was cancelled by + * the user. #cancel is set to FALSE if the drag was accepted. + */ + gulong addOnDockDragEnd(void delegate(bool, DockItem) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) + { + return Signals.connect(this, "dock-drag-end", dlg, connectFlags ^ ConnectFlags.SWAPPED); + } + + /** + * Signals that a dock item dragging motion event has occured. + * + * Params: + * device = The device used. + * x = The x-position that the dock item has been dragged to. + * y = The y-position that the dock item has been dragged to. + */ + gulong addOnDockDragMotion(void delegate(Device, int, int, DockItem) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) + { + return Signals.connect(this, "dock-drag-motion", dlg, connectFlags ^ ConnectFlags.SWAPPED); + } + + /** + * The ::move-focus-child signal is emitted when a change of focus is + * requested for the child widget of a dock item. The @dir parameter + * specifies the direction in which focus is to be shifted. + * + * Params: + * dir = The direction in which to move focus + * + * Since: 3.3.2 + */ + gulong addOnMoveFocusChild(void delegate(GtkDirectionType, DockItem) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) + { + return Signals.connect(this, "move-focus-child", dlg, connectFlags ^ ConnectFlags.SWAPPED); + } + + /** + * Signals that this dock has been selected from a switcher. + */ + gulong addOnSelected(void delegate(DockItem) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) + { + return Signals.connect(this, "selected", dlg, connectFlags ^ ConnectFlags.SWAPPED); + } +} diff --git a/generated/gdl/gdl/DockItemButtonImage.d b/generated/gdl/gdl/DockItemButtonImage.d new file mode 100644 index 000000000..aa3aa458e --- /dev/null +++ b/generated/gdl/gdl/DockItemButtonImage.d @@ -0,0 +1,93 @@ +/* + * 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 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gdl.DockItemButtonImage; + +private import gdl.c.functions; +public import gdl.c.types; +private import glib.ConstructionException; +private import gobject.ObjectG; +private import gtk.BuildableIF; +private import gtk.BuildableT; +private import gtk.Widget; + + +/** */ +public class DockItemButtonImage : Widget +{ + /** the main Gtk struct */ + protected GdlDockItemButtonImage* gdlDockItemButtonImage; + + /** Get the main Gtk struct */ + public GdlDockItemButtonImage* getDockItemButtonImageStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return gdlDockItemButtonImage; + } + + /** the main Gtk struct as a void* */ + protected override void* getStruct() + { + return cast(void*)gdlDockItemButtonImage; + } + + /** + * Sets our main struct and passes it to the parent class. + */ + public this (GdlDockItemButtonImage* gdlDockItemButtonImage, bool ownedRef = false) + { + this.gdlDockItemButtonImage = gdlDockItemButtonImage; + super(cast(GtkWidget*)gdlDockItemButtonImage, ownedRef); + } + + + /** */ + public static GType getType() + { + return gdl_dock_item_button_image_get_type(); + } + + /** + * Creates a new GDL dock button image object. + * + * Params: + * imageType = Specifies what type of image the widget should display + * + * Returns: The newly created dock item button image widget + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this(GdlDockItemButtonImageType imageType) + { + auto __p = gdl_dock_item_button_image_new(imageType); + + if(__p is null) + { + throw new ConstructionException("null returned by new"); + } + + this(cast(GdlDockItemButtonImage*) __p); + } +} diff --git a/generated/gdl/gdl/DockItemClass.d b/generated/gdl/gdl/DockItemClass.d new file mode 100644 index 000000000..f49d7c711 --- /dev/null +++ b/generated/gdl/gdl/DockItemClass.d @@ -0,0 +1,75 @@ +/* + * 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 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gdl.DockItemClass; + +private import gdl.c.functions; +public import gdl.c.types; + + +/** */ +public class DockItemClass +{ + /** the main Gtk struct */ + protected GdlDockItemClass* gdlDockItemClass; + protected bool ownedRef; + + /** Get the main Gtk struct */ + public GdlDockItemClass* getDockItemClassStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return gdlDockItemClass; + } + + /** the main Gtk struct as a void* */ + protected void* getStruct() + { + return cast(void*)gdlDockItemClass; + } + + /** + * Sets our main struct and passes it to the parent class. + */ + public this (GdlDockItemClass* gdlDockItemClass, bool ownedRef = false) + { + this.gdlDockItemClass = gdlDockItemClass; + this.ownedRef = ownedRef; + } + + + /** + * Define in the corresponding kind of dock item has a grip. Even if an item + * has a grip it can be hidden. + * + * Params: + * hasGrip = %TRUE is the dock item has a grip + * + * Since: 3.6 + */ + public void setHasGrip(bool hasGrip) + { + gdl_dock_item_class_set_has_grip(gdlDockItemClass, hasGrip); + } +} diff --git a/generated/gdl/gdl/DockItemGrip.d b/generated/gdl/gdl/DockItemGrip.d new file mode 100644 index 000000000..22d869ac5 --- /dev/null +++ b/generated/gdl/gdl/DockItemGrip.d @@ -0,0 +1,149 @@ +/* + * 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 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gdl.DockItemGrip; + +private import gdk.Event; +private import gdl.DockItem; +private import gdl.c.functions; +public import gdl.c.types; +private import glib.ConstructionException; +private import gobject.ObjectG; +private import gtk.BuildableIF; +private import gtk.BuildableT; +private import gtk.Container; +private import gtk.Widget; + + +/** */ +public class DockItemGrip : Container +{ + /** the main Gtk struct */ + protected GdlDockItemGrip* gdlDockItemGrip; + + /** Get the main Gtk struct */ + public GdlDockItemGrip* getDockItemGripStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return gdlDockItemGrip; + } + + /** the main Gtk struct as a void* */ + protected override void* getStruct() + { + return cast(void*)gdlDockItemGrip; + } + + /** + * Sets our main struct and passes it to the parent class. + */ + public this (GdlDockItemGrip* gdlDockItemGrip, bool ownedRef = false) + { + this.gdlDockItemGrip = gdlDockItemGrip; + super(cast(GtkContainer*)gdlDockItemGrip, ownedRef); + } + + + /** */ + public static GType getType() + { + return gdl_dock_item_grip_get_type(); + } + + /** + * Creates a new GDL dock item grip object. + * + * Params: + * item = The dock item that will "own" this grip widget. + * + * Returns: The newly created dock item grip widget. + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this(DockItem item) + { + auto __p = gdl_dock_item_grip_new((item is null) ? null : item.getDockItemStruct()); + + if(__p is null) + { + throw new ConstructionException("null returned by new"); + } + + this(cast(GdlDockItemGrip*) __p); + } + + /** + * Return %TRUE if the grip window has reveived the event. + * + * Params: + * event = A #GdkEvent + * + * Returns: %TRUE if the grip has received the event + */ + public bool hasEvent(Event event) + { + return gdl_dock_item_grip_has_event(gdlDockItemGrip, (event is null) ? null : event.getEventStruct()) != 0; + } + + /** + * This function hides the dock item's grip widget handle hatching. + */ + public void hideHandle() + { + gdl_dock_item_grip_hide_handle(gdlDockItemGrip); + } + + /** + * Change the cursor when a drag operation is started. + * + * Params: + * inDrag = %TRUE if a drag operation is started + * + * Since: 3.6 + */ + public void setCursor(bool inDrag) + { + gdl_dock_item_grip_set_cursor(gdlDockItemGrip, inDrag); + } + + /** + * Replaces the current label widget with another widget. + * + * Params: + * label = The widget that will become the label. + */ + public void setLabel(Widget label) + { + gdl_dock_item_grip_set_label(gdlDockItemGrip, (label is null) ? null : label.getWidgetStruct()); + } + + /** + * This function shows the dock item's grip widget handle hatching. + */ + public void showHandle() + { + gdl_dock_item_grip_show_handle(gdlDockItemGrip); + } +} diff --git a/generated/gdl/gdl/DockLayout.d b/generated/gdl/gdl/DockLayout.d new file mode 100644 index 000000000..34237c879 --- /dev/null +++ b/generated/gdl/gdl/DockLayout.d @@ -0,0 +1,249 @@ +/* + * 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 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gdl.DockLayout; + +private import gdl.DockMaster; +private import gdl.c.functions; +public import gdl.c.types; +private import glib.ConstructionException; +private import glib.ListG; +private import glib.Str; +private import gobject.ObjectG; + + +/** + * The GdlDockLayout struct contains only private fields + * and should not be directly accessed. + */ +public class DockLayout : ObjectG +{ + /** the main Gtk struct */ + protected GdlDockLayout* gdlDockLayout; + + /** Get the main Gtk struct */ + public GdlDockLayout* getDockLayoutStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return gdlDockLayout; + } + + /** the main Gtk struct as a void* */ + protected override void* getStruct() + { + return cast(void*)gdlDockLayout; + } + + /** + * Sets our main struct and passes it to the parent class. + */ + public this (GdlDockLayout* gdlDockLayout, bool ownedRef = false) + { + this.gdlDockLayout = gdlDockLayout; + super(cast(GObject*)gdlDockLayout, ownedRef); + } + + + /** */ + public static GType getType() + { + return gdl_dock_layout_get_type(); + } + + /** + * Creates a new #GdlDockLayout. Instead of setting @master + * directly with a master object, it is possible to use a #GdlDockObject, in + * this case the layout will be attached to the same master than the dock + * object. + * + * Params: + * master = A master or a dock object to which the layout will be attached. + * + * Returns: New #GdlDockLayout item. + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this(ObjectG master) + { + auto __p = gdl_dock_layout_new((master is null) ? null : master.getObjectGStruct()); + + if(__p is null) + { + throw new ConstructionException("null returned by new"); + } + + this(cast(GdlDockLayout*) __p, true); + } + + /** + * Attach the @layout to the @master and delete the reference to + * the master that the layout attached previously. + * + * Deprecated 3.6: Use gdl_dock_layout_set_master() instead. + * + * Params: + * master = The master object to which the layout will be attached + */ + public void attach(DockMaster master) + { + gdl_dock_layout_attach(gdlDockLayout, (master is null) ? null : master.getDockMasterStruct()); + } + + /** + * Deletes the layout with the given name from the memory. + * This will set #GdlDockLayout:dirty to %TRUE. + * + * Params: + * name = The name of the layout to delete. + */ + public void deleteLayout(string name) + { + gdl_dock_layout_delete_layout(gdlDockLayout, Str.toStringz(name)); + } + + /** + * Get the list of layout names including or not the default layout. + * + * Params: + * includeDefault = %TRUE to include the default layout. + * + * Returns: a #GList list + * holding the layout names. You must first free each element in the list + * with g_free(), then free the list itself with g_list_free(). + */ + public ListG getLayouts(bool includeDefault) + { + auto __p = gdl_dock_layout_get_layouts(gdlDockLayout, includeDefault); + + if(__p is null) + { + return null; + } + + return new ListG(cast(GList*) __p, true); + } + + /** + * Retrieves the master of the object. + * + * Returns: a #GdlDockMaster object + * + * Since: 3.6 + */ + public ObjectG getMaster() + { + auto __p = gdl_dock_layout_get_master(gdlDockLayout); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(ObjectG)(cast(GObject*) __p); + } + + /** + * Checks whether the XML tree in memory is different from the file where the layout was saved. + * + * Returns: %TRUE is the layout in the memory is different from the file, else %FALSE. + */ + public bool isDirty() + { + return gdl_dock_layout_is_dirty(gdlDockLayout) != 0; + } + + /** + * Loads the layout from file with the given @filename. + * This will set #GdlDockLayout:dirty to %FALSE. + * + * Params: + * filename = The name of the file to load. + * + * Returns: %TRUE if @layout successfully loaded else %FALSE + */ + public bool loadFromFile(string filename) + { + return gdl_dock_layout_load_from_file(gdlDockLayout, Str.toStringz(filename)) != 0; + } + + /** + * Loads the layout with the given name from the memory. + * This will set #GdlDockLayout:dirty to %TRUE. + * + * See also gdl_dock_layout_load_from_file() + * + * Params: + * name = The name of the layout to load or %NULL for a default layout name. + * + * Returns: %TRUE if layout successfully loaded else %FALSE + */ + public bool loadLayout(string name) + { + return gdl_dock_layout_load_layout(gdlDockLayout, Str.toStringz(name)) != 0; + } + + /** + * Saves the @layout with the given name to the memory. + * This will set #GdlDockLayout:dirty to %TRUE. + * + * See also gdl_dock_layout_save_to_file(). + * + * Params: + * name = The name of the layout to save or %NULL for a default layout name. + */ + public void saveLayout(string name) + { + gdl_dock_layout_save_layout(gdlDockLayout, Str.toStringz(name)); + } + + /** + * This function saves the current layout in XML format to + * the file with the given @filename. + * + * Params: + * filename = Name of the file we want to save in layout + * + * Returns: %TRUE if @layout successfuly save to the file, otherwise %FALSE. + */ + public bool saveToFile(string filename) + { + return gdl_dock_layout_save_to_file(gdlDockLayout, Str.toStringz(filename)) != 0; + } + + /** + * Attach the @layout to the @master and delete the reference to + * the master that the layout attached previously. Instead of setting @master + * directly with the master object, it is possible to use a #GdlDockObject, in + * this case the layout will be attached to the same master than the dock + * object. + * + * Params: + * master = The master object to which the layout will be attached + */ + public void setMaster(ObjectG master) + { + gdl_dock_layout_set_master(gdlDockLayout, (master is null) ? null : master.getObjectGStruct()); + } +} diff --git a/generated/gdl/gdl/DockMaster.d b/generated/gdl/gdl/DockMaster.d new file mode 100644 index 000000000..921a4974d --- /dev/null +++ b/generated/gdl/gdl/DockMaster.d @@ -0,0 +1,193 @@ +/* + * 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 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gdl.DockMaster; + +private import gdl.DockObject; +private import gdl.c.functions; +public import gdl.c.types; +private import glib.Str; +private import gobject.ObjectG; +private import gobject.Signals; +private import std.algorithm; + + +/** */ +public class DockMaster : ObjectG +{ + /** the main Gtk struct */ + protected GdlDockMaster* gdlDockMaster; + + /** Get the main Gtk struct */ + public GdlDockMaster* getDockMasterStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return gdlDockMaster; + } + + /** the main Gtk struct as a void* */ + protected override void* getStruct() + { + return cast(void*)gdlDockMaster; + } + + /** + * Sets our main struct and passes it to the parent class. + */ + public this (GdlDockMaster* gdlDockMaster, bool ownedRef = false) + { + this.gdlDockMaster = gdlDockMaster; + super(cast(GObject*)gdlDockMaster, ownedRef); + } + + + /** */ + public static GType getType() + { + return gdl_dock_master_get_type(); + } + + /** + * Add a new dock widget to the master. + * + * Params: + * object = a #GdlDockObject + */ + public void add(DockObject object) + { + gdl_dock_master_add(gdlDockMaster, (object is null) ? null : object.getDockObjectStruct()); + } + + alias foreac = foreach_; + /** + * Call @function on each dock widget of the master. + * + * Params: + * function_ = the function to call with each element's data + * userData = user data to pass to the function + */ + public void foreach_(GFunc function_, void* userData) + { + gdl_dock_master_foreach(gdlDockMaster, function_, userData); + } + + /** + * Call @function on each top level dock widget of the master, including or not + * the controller. + * + * Params: + * includeController = %TRUE to include the controller + * function_ = the function to call with each element's data + * userData = user data to pass to the function + */ + public void foreachToplevel(bool includeController, GFunc function_, void* userData) + { + gdl_dock_master_foreach_toplevel(gdlDockMaster, includeController, function_, userData); + } + + /** + * Retrieves the #GdlDockObject acting as the controller. + * + * Returns: A #GdlDockObject. + */ + public DockObject getController() + { + auto __p = gdl_dock_master_get_controller(gdlDockMaster); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(DockObject)(cast(GdlDockObject*) __p); + } + + /** + * Return an unique translated dock name. + * + * Returns: a new translated name. The string has to be freed + * with g_free(). + * + * Since: 3.6 + */ + public string getDockName() + { + auto retStr = gdl_dock_master_get_dock_name(gdlDockMaster); + + scope(exit) Str.freeString(retStr); + return Str.toString(retStr); + } + + /** + * Looks for a #GdlDockObject named @nick_name. + * + * Params: + * nickName = the name of the dock widget. + * + * Returns: A #GdlDockObject named @nick_name or %NULL if it does not exist. + */ + public DockObject getObject(string nickName) + { + auto __p = gdl_dock_master_get_object(gdlDockMaster, Str.toStringz(nickName)); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(DockObject)(cast(GdlDockObject*) __p); + } + + /** + * Remove one dock widget from the master. + * + * Params: + * object = a #GdlDockObject + */ + public void remove(DockObject object) + { + gdl_dock_master_remove(gdlDockMaster, (object is null) ? null : object.getDockObjectStruct()); + } + + /** + * Set a new controller. The controller must be a top level #GdlDockObject. + * + * Params: + * newController = a #GdlDockObject + */ + public void setController(DockObject newController) + { + gdl_dock_master_set_controller(gdlDockMaster, (newController is null) ? null : newController.getDockObjectStruct()); + } + + /** + * Signals that the layout has changed, one or more widgets have been moved, + * added or removed. + */ + gulong addOnLayoutChanged(void delegate(DockMaster) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) + { + return Signals.connect(this, "layout-changed", dlg, connectFlags ^ ConnectFlags.SWAPPED); + } +} diff --git a/generated/gdl/gdl/DockNotebook.d b/generated/gdl/gdl/DockNotebook.d new file mode 100644 index 000000000..6ba2b5877 --- /dev/null +++ b/generated/gdl/gdl/DockNotebook.d @@ -0,0 +1,91 @@ +/* + * 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 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gdl.DockNotebook; + +private import gdl.DockItem; +private import gdl.c.functions; +public import gdl.c.types; +private import glib.ConstructionException; +private import gobject.ObjectG; +private import gtk.Widget; + + +/** */ +public class DockNotebook : DockItem +{ + /** the main Gtk struct */ + protected GdlDockNotebook* gdlDockNotebook; + + /** Get the main Gtk struct */ + public GdlDockNotebook* getDockNotebookStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return gdlDockNotebook; + } + + /** the main Gtk struct as a void* */ + protected override void* getStruct() + { + return cast(void*)gdlDockNotebook; + } + + /** + * Sets our main struct and passes it to the parent class. + */ + public this (GdlDockNotebook* gdlDockNotebook, bool ownedRef = false) + { + this.gdlDockNotebook = gdlDockNotebook; + super(cast(GdlDockItem*)gdlDockNotebook, ownedRef); + } + + + /** */ + public static GType getType() + { + return gdl_dock_notebook_get_type(); + } + + /** + * Creates a new manual #GdlDockNotebook widget. This function is seldom useful as + * such widget is normally created and destroyed automatically when needed by + * the master. + * + * Returns: The newly created #GdlDockNotebook. + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this() + { + auto __p = gdl_dock_notebook_new(); + + if(__p is null) + { + throw new ConstructionException("null returned by new"); + } + + this(cast(GdlDockNotebook*) __p); + } +} diff --git a/generated/gdl/gdl/DockObject.d b/generated/gdl/gdl/DockObject.d new file mode 100644 index 000000000..813f393ec --- /dev/null +++ b/generated/gdl/gdl/DockObject.d @@ -0,0 +1,548 @@ +/* + * 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 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gdl.DockObject; + +private import gdkpixbuf.Pixbuf; +private import gdl.Dock; +private import gdl.c.functions; +public import gdl.c.types; +private import glib.Str; +private import gobject.ObjectG; +private import gobject.Signals; +private import gobject.Value; +private import gtk.BuildableIF; +private import gtk.BuildableT; +private import gtk.Container; +private import std.algorithm; + + +/** */ +public class DockObject : Container +{ + /** the main Gtk struct */ + protected GdlDockObject* gdlDockObject; + + /** Get the main Gtk struct */ + public GdlDockObject* getDockObjectStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return gdlDockObject; + } + + /** the main Gtk struct as a void* */ + protected override void* getStruct() + { + return cast(void*)gdlDockObject; + } + + /** + * Sets our main struct and passes it to the parent class. + */ + public this (GdlDockObject* gdlDockObject, bool ownedRef = false) + { + this.gdlDockObject = gdlDockObject; + super(cast(GtkContainer*)gdlDockObject, ownedRef); + } + + + /** */ + public static GType getType() + { + return gdl_dock_object_get_type(); + } + + /** + * Finds the nickname for a given type + * + * Params: + * type = The type for which to find the nickname + * + * Returns: If the object has a nickname, then it is returned. + * Otherwise, the type name. + */ + public static string nickFromType(GType type) + { + return Str.toString(gdl_dock_object_nick_from_type(type)); + } + + /** + * Assigns an object type to a given nickname. If the nickname already exists, + * then it reassigns it to a new object type. + * + * Params: + * nick = The nickname for the object type + * type = The object type + * + * Returns: If the nick was previously assigned, the old type is returned. + * Otherwise, %G_TYPE_NONE. + */ + public static GType setTypeForNick(string nick, GType type) + { + return gdl_dock_object_set_type_for_nick(Str.toStringz(nick), type); + } + + /** + * Finds the object type assigned to a given nickname. + * + * Params: + * nick = The nickname for the object type + * + * Returns: If the nickname has previously been assigned, then the corresponding + * object type is returned. Otherwise, %G_TYPE_NONE. + */ + public static GType typeFromNick(string nick) + { + return gdl_dock_object_type_from_nick(Str.toStringz(nick)); + } + + /** + * Add a link between a #GdlDockObject and a master. It is normally not used + * directly because it is automatically called when a new object is docked. + * + * Params: + * master = A #GdlDockMaster + */ + public void bind(ObjectG master) + { + gdl_dock_object_bind(gdlDockObject, (master is null) ? null : master.getObjectGStruct()); + } + + /** + * This function returns information about placement of a child dock + * object inside another dock object. The function returns %TRUE if + * @child is effectively a child of @object. @placement should + * normally be initially setup to %GDL_DOCK_NONE. If it's set to some + * other value, this function will not touch the stored value if the + * specified placement is "compatible" with the actual placement of + * the child. + * + * @placement can be %NULL, in which case the function simply tells if + * @child is attached to @object. + * + * Params: + * child = the child of the @object we want the placement for + * placement = where to return the placement information + * + * Returns: %TRUE if @child is a child of @object. + */ + public bool childPlacement(DockObject child, GdlDockPlacement* placement) + { + return gdl_dock_object_child_placement(gdlDockObject, (child is null) ? null : child.getDockObjectStruct(), placement) != 0; + } + + /** + * Dissociate a dock object from its parent, including or not its children. + * + * Params: + * recursive = %TRUE to detach children + */ + public void detach(bool recursive) + { + gdl_dock_object_detach(gdlDockObject, recursive); + } + + /** + * Dock a dock widget in @object at the defined position. + * + * Params: + * requestor = The widget to dock + * position = The position for the child + * otherData = Optional data giving additional information + * depending on the dock object. + */ + public void dock(DockObject requestor, GdlDockPlacement position, Value otherData) + { + gdl_dock_object_dock(gdlDockObject, (requestor is null) ? null : requestor.getDockObjectStruct(), position, (otherData is null) ? null : otherData.getValueStruct()); + } + + /** + * Dock a dock widget in @object at the defined position. + * + * Params: + * x = X coordinate + * y = Y coordinate + * request = A #GdlDockRequest with information about the docking position + * + * Returns: %TRUE if @object has been docked. + */ + public bool dockRequest(int x, int y, GdlDockRequest* request) + { + return gdl_dock_object_dock_request(gdlDockObject, x, y, request) != 0; + } + + /** + * Temporarily freezes a dock object, any call to reduce on the object has no + * immediate effect. If gdl_dock_object_freeze() has been called more than once, + * gdl_dock_object_thaw() must be called an equal number of times. + */ + public void freeze() + { + gdl_dock_object_freeze(gdlDockObject); + } + + /** + * Retrieves the controller of the object. + * + * Returns: a #GdlDockObject object + * + * Since: 3.6 + */ + public DockObject getController() + { + auto __p = gdl_dock_object_get_controller(gdlDockObject); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(DockObject)(cast(GdlDockObject*) __p); + } + + /** + * Retrieves the long name of the object. This name is an human readable string + * which can be displayed in the user interface. + * + * Returns: the name of the object. + * + * Since: 3.6 + */ + public string getLongName() + { + return Str.toString(gdl_dock_object_get_long_name(gdlDockObject)); + } + + /** + * Retrieves the master of the object. + * + * Returns: a #GdlDockMaster object + * + * Since: 3.6 + */ + public ObjectG getMaster() + { + auto __p = gdl_dock_object_get_master(gdlDockObject); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(ObjectG)(cast(GObject*) __p); + } + + /** + * Retrieves the name of the object. This name is used to identify the object. + * + * Returns: the name of the object. + * + * Since: 3.6 + */ + public override string getName() + { + return Str.toString(gdl_dock_object_get_name(gdlDockObject)); + } + + /** + * Returns a parent #GdlDockObject if it exists. + * + * Returns: a #GdlDockObject or %NULL if such object does not exist. + */ + public DockObject getParentObject() + { + auto __p = gdl_dock_object_get_parent_object(gdlDockObject); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(DockObject)(cast(GdlDockObject*) __p); + } + + /** + * Retrieves a pixbuf used as the dock object icon. + * + * Returns: icon for dock object + * + * Since: 3.6 + */ + public Pixbuf getPixbuf() + { + auto __p = gdl_dock_object_get_pixbuf(gdlDockObject); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) __p); + } + + /** + * Retrieves the a stock id used as the object icon. + * + * Returns: A stock id corresponding to the object icon. + * + * Since: 3.6 + */ + public string getStockId() + { + return Str.toString(gdl_dock_object_get_stock_id(gdlDockObject)); + } + + /** + * Get the top level #GdlDock widget of @object or %NULL if cannot be found. + * + * Returns: A #GdlDock or %NULL. + */ + public override Dock getToplevel() + { + auto __p = gdl_dock_object_get_toplevel(gdlDockObject); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Dock)(cast(GdlDock*) __p); + } + + /** + * Determine if an object is managed by the dock master, such object is + * destroyed automatically when it is not needed anymore. + * + * Returns: %TRUE if the object is managed automatically by the dock master. + * + * Since: 3.6 + */ + public bool isAutomatic() + { + return gdl_dock_object_is_automatic(gdlDockObject) != 0; + } + + /** + * Check if the object is bound to a master. + * + * Returns: %TRUE if @object has a master + */ + public bool isBound() + { + return gdl_dock_object_is_bound(gdlDockObject) != 0; + } + + /** + * Checks whether a given #GdlDockObject is closed. It can be only hidden and + * still in the widget hierarchy or detached. + * + * Returns: %TRUE if the dock object is closed. + * + * Since: 3.6 + */ + public bool isClosed() + { + return gdl_dock_object_is_closed(gdlDockObject) != 0; + } + + /** + * Check if an object is a compound object, accepting children widget or not. + * + * Returns: %TRUE if @object is a compound object. + */ + public bool isCompound() + { + return gdl_dock_object_is_compound(gdlDockObject) != 0; + } + + /** + * Determine if an object is frozen and is not removed immediately from the + * widget hierarchy when it is reduced. + * + * Returns: %TRUE if the object is frozen. + * + * Since: 3.6 + */ + public bool isFrozen() + { + return gdl_dock_object_is_frozen(gdlDockObject) != 0; + } + + /** + * Emits the #GdlDockMaster::layout-changed signal on the master of the object + * if existing. + * + * Since: 3.6 + */ + public void layoutChangedNotify() + { + gdl_dock_object_layout_changed_notify(gdlDockObject); + } + + /** + * Presents the GDL object to the user. By example, this will select the + * corresponding page if the object is in a notebook. If @child is missing, + * only the @object will be show. + * + * Params: + * child = The child widget to present or %NULL + */ + public void present(DockObject child) + { + gdl_dock_object_present(gdlDockObject, (child is null) ? null : child.getDockObjectStruct()); + } + + /** + * Remove a compound object if it is not longer useful to hold the child. The + * object has to be removed and the child reattached to the parent. + */ + public void reduce() + { + gdl_dock_object_reduce(gdlDockObject); + } + + /** + * Move the @child widget at another place. + * + * Params: + * child = The child widget to reorder + * newPosition = New position for the child + * otherData = Optional data giving additional information + * depending on the dock object. + * + * Returns: %TRUE if @child has been moved + */ + public bool reorder(DockObject child, GdlDockPlacement newPosition, Value otherData) + { + return gdl_dock_object_reorder(gdlDockObject, (child is null) ? null : child.getDockObjectStruct(), newPosition, (otherData is null) ? null : otherData.getValueStruct()) != 0; + } + + /** + * Set the long name of the object. This name is an human readable string + * which can be displayed in the user interface. + * + * Params: + * name = a name for the object + * + * Since: 3.6 + */ + public void setLongName(string name) + { + gdl_dock_object_set_long_name(gdlDockObject, Str.toStringz(name)); + } + + /** + * A #GdlDockObject is managed by default by the dock master, use this function + * to make it a manual object if you want to manage the destruction of the + * object. + * + * Since: 3.6 + */ + public void setManual() + { + gdl_dock_object_set_manual(gdlDockObject); + } + + /** + * Set the name of the object used to identify it. + * + * Params: + * name = a name for the object + * + * Since: 3.6 + */ + public override void setName(string name) + { + gdl_dock_object_set_name(gdlDockObject, Str.toStringz(name)); + } + + /** + * Set a icon for a dock object using a #GdkPixbuf. + * + * Params: + * icon = a icon or %NULL + * + * Since: 3.6 + */ + public void setPixbuf(Pixbuf icon) + { + gdl_dock_object_set_pixbuf(gdlDockObject, (icon is null) ? null : icon.getPixbufStruct()); + } + + /** + * Set an icon for the dock object using a stock id. + * + * Params: + * stockId = a stock id + * + * Since: 3.6 + */ + public void setStockId(string stockId) + { + gdl_dock_object_set_stock_id(gdlDockObject, Str.toStringz(stockId)); + } + + /** + * Thaws a dock object frozen with gdl_dock_object_freeze(). + * Any pending reduce calls are made, maybe leading to the destruction of + * the object. + */ + public void thaw() + { + gdl_dock_object_thaw(gdlDockObject); + } + + /** + * This removes the link between an dock object and its master. + */ + public void unbind() + { + gdl_dock_object_unbind(gdlDockObject); + } + + /** + * Signals that the #GdlDockObject is detached. + * + * Params: + * recursive = %TRUE if children have to be detached too. + */ + gulong addOnDetach(void delegate(bool, DockObject) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) + { + return Signals.connect(this, "detach", dlg, connectFlags ^ ConnectFlags.SWAPPED); + } + + /** + * Signals that the #GdlDockObject has been docked. + * + * Params: + * requestor = The widget to dock + * position = The position for the child + * otherData = Optional data giving additional information + */ + gulong addOnDock(void delegate(DockObject, GdlDockPlacement, Value, DockObject) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) + { + return Signals.connect(this, "dock", dlg, connectFlags ^ ConnectFlags.SWAPPED); + } +} diff --git a/generated/gdl/gdl/DockPaned.d b/generated/gdl/gdl/DockPaned.d new file mode 100644 index 000000000..f4eecfbb5 --- /dev/null +++ b/generated/gdl/gdl/DockPaned.d @@ -0,0 +1,94 @@ +/* + * 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 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gdl.DockPaned; + +private import gdl.DockItem; +private import gdl.c.functions; +public import gdl.c.types; +private import glib.ConstructionException; +private import gobject.ObjectG; +private import gtk.Widget; + + +/** */ +public class DockPaned : DockItem +{ + /** the main Gtk struct */ + protected GdlDockPaned* gdlDockPaned; + + /** Get the main Gtk struct */ + public GdlDockPaned* getDockPanedStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return gdlDockPaned; + } + + /** the main Gtk struct as a void* */ + protected override void* getStruct() + { + return cast(void*)gdlDockPaned; + } + + /** + * Sets our main struct and passes it to the parent class. + */ + public this (GdlDockPaned* gdlDockPaned, bool ownedRef = false) + { + this.gdlDockPaned = gdlDockPaned; + super(cast(GdlDockItem*)gdlDockPaned, ownedRef); + } + + + /** */ + public static GType getType() + { + return gdl_dock_paned_get_type(); + } + + /** + * Creates a new manual #GdlDockPaned widget. This function is seldom useful as + * such widget is normally created and destroyed automatically when needed by + * the master. + * + * Params: + * orientation = the pane's orientation. + * + * Returns: a new #GdlDockPaned. + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this(GtkOrientation orientation) + { + auto __p = gdl_dock_paned_new(orientation); + + if(__p is null) + { + throw new ConstructionException("null returned by new"); + } + + this(cast(GdlDockPaned*) __p); + } +} diff --git a/generated/gdl/gdl/DockParam.d b/generated/gdl/gdl/DockParam.d new file mode 100644 index 000000000..b0d7053ef --- /dev/null +++ b/generated/gdl/gdl/DockParam.d @@ -0,0 +1,67 @@ +/* + * 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 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gdl.DockParam; + +private import gdl.c.functions; +public import gdl.c.types; + + +/** */ +public class DockParam +{ + /** the main Gtk struct */ + protected GdlDockParam* gdlDockParam; + protected bool ownedRef; + + /** Get the main Gtk struct */ + public GdlDockParam* getDockParamStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return gdlDockParam; + } + + /** the main Gtk struct as a void* */ + protected void* getStruct() + { + return cast(void*)gdlDockParam; + } + + /** + * Sets our main struct and passes it to the parent class. + */ + public this (GdlDockParam* gdlDockParam, bool ownedRef = false) + { + this.gdlDockParam = gdlDockParam; + this.ownedRef = ownedRef; + } + + + /** */ + public static GType getType() + { + return gdl_dock_param_get_type(); + } +} diff --git a/generated/gdl/gdl/DockPlaceholder.d b/generated/gdl/gdl/DockPlaceholder.d new file mode 100644 index 000000000..f046eb8c8 --- /dev/null +++ b/generated/gdl/gdl/DockPlaceholder.d @@ -0,0 +1,109 @@ +/* + * 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 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gdl.DockPlaceholder; + +private import gdl.DockObject; +private import gdl.c.functions; +public import gdl.c.types; +private import glib.ConstructionException; +private import glib.Str; +private import gobject.ObjectG; +private import gtk.Widget; + + +/** */ +public class DockPlaceholder : DockObject +{ + /** the main Gtk struct */ + protected GdlDockPlaceholder* gdlDockPlaceholder; + + /** Get the main Gtk struct */ + public GdlDockPlaceholder* getDockPlaceholderStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return gdlDockPlaceholder; + } + + /** the main Gtk struct as a void* */ + protected override void* getStruct() + { + return cast(void*)gdlDockPlaceholder; + } + + /** + * Sets our main struct and passes it to the parent class. + */ + public this (GdlDockPlaceholder* gdlDockPlaceholder, bool ownedRef = false) + { + this.gdlDockPlaceholder = gdlDockPlaceholder; + super(cast(GdlDockObject*)gdlDockPlaceholder, ownedRef); + } + + + /** */ + public static GType getType() + { + return gdl_dock_placeholder_get_type(); + } + + /** + * Creates a new dock placeholder at @object place. This is a kind of marker + * allowing you to dock new items later at this place. It is not completely + * working though. + * + * Params: + * name = Unique name for identifying the dock object. + * object = Corresponding #GdlDockObject + * position = The position to dock a new item in @object + * sticky = %TRUE if the placeholder move with the @object + * + * Returns: The newly created placeholder. + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this(string name, DockObject object, GdlDockPlacement position, bool sticky) + { + auto __p = gdl_dock_placeholder_new(Str.toStringz(name), (object is null) ? null : object.getDockObjectStruct(), position, sticky); + + if(__p is null) + { + throw new ConstructionException("null returned by new"); + } + + this(cast(GdlDockPlaceholder*) __p); + } + + /** + * Move the placeholder to the position of @object. + * + * Params: + * object = A new #GdlDockObject + */ + public void attach(DockObject object) + { + gdl_dock_placeholder_attach(gdlDockPlaceholder, (object is null) ? null : object.getDockObjectStruct()); + } +} diff --git a/generated/gdl/gdl/DockTablabel.d b/generated/gdl/gdl/DockTablabel.d new file mode 100644 index 000000000..380870d22 --- /dev/null +++ b/generated/gdl/gdl/DockTablabel.d @@ -0,0 +1,111 @@ +/* + * 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 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gdl.DockTablabel; + +private import gdk.Event; +private import gdl.DockItem; +private import gdl.c.functions; +public import gdl.c.types; +private import glib.ConstructionException; +private import gobject.ObjectG; +private import gobject.Signals; +private import gtk.Bin; +private import gtk.BuildableIF; +private import gtk.BuildableT; +private import gtk.Widget; +private import std.algorithm; + + +/** */ +public class DockTablabel : Bin +{ + /** the main Gtk struct */ + protected GdlDockTablabel* gdlDockTablabel; + + /** Get the main Gtk struct */ + public GdlDockTablabel* getDockTablabelStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return gdlDockTablabel; + } + + /** the main Gtk struct as a void* */ + protected override void* getStruct() + { + return cast(void*)gdlDockTablabel; + } + + /** + * Sets our main struct and passes it to the parent class. + */ + public this (GdlDockTablabel* gdlDockTablabel, bool ownedRef = false) + { + this.gdlDockTablabel = gdlDockTablabel; + super(cast(GtkBin*)gdlDockTablabel, ownedRef); + } + + + /** */ + public static GType getType() + { + return gdl_dock_tablabel_get_type(); + } + + /** + * Creates a new GDL tab label widget. + * + * Deprecated: Use a #GtkLabel instead + * + * Params: + * item = The dock item that associated with this label widget. + * + * Returns: a new #GdlDockTablabel. + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this(DockItem item) + { + auto __p = gdl_dock_tablabel_new((item is null) ? null : item.getDockItemStruct()); + + if(__p is null) + { + throw new ConstructionException("null returned by new"); + } + + this(cast(GdlDockTablabel*) __p); + } + + /** + * This signal is emitted when the user clicks on the label. + * + * Params: + * event = A #GdkEvent + */ + gulong addOnButtonPressedHandle(void delegate(Event, DockTablabel) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) + { + return Signals.connect(this, "button-pressed-handle", dlg, connectFlags ^ ConnectFlags.SWAPPED); + } +} diff --git a/generated/gdl/gdl/PreviewWindow.d b/generated/gdl/gdl/PreviewWindow.d new file mode 100644 index 000000000..d07a73ca3 --- /dev/null +++ b/generated/gdl/gdl/PreviewWindow.d @@ -0,0 +1,107 @@ +/* + * 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 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gdl.PreviewWindow; + +private import gdl.c.functions; +public import gdl.c.types; +private import glib.ConstructionException; +private import gobject.ObjectG; +private import gtk.BuildableIF; +private import gtk.BuildableT; +private import gtk.Widget; +private import gtk.Window; + + +/** + * The GdlDockLayout struct contains only private fields + * and should not be directly accessed. + */ +public class PreviewWindow : Window +{ + /** the main Gtk struct */ + protected GdlPreviewWindow* gdlPreviewWindow; + + /** Get the main Gtk struct */ + public GdlPreviewWindow* getPreviewWindowStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return gdlPreviewWindow; + } + + /** the main Gtk struct as a void* */ + protected override void* getStruct() + { + return cast(void*)gdlPreviewWindow; + } + + /** + * Sets our main struct and passes it to the parent class. + */ + public this (GdlPreviewWindow* gdlPreviewWindow, bool ownedRef = false) + { + this.gdlPreviewWindow = gdlPreviewWindow; + super(cast(GtkWindow*)gdlPreviewWindow, ownedRef); + } + + + /** */ + public static GType getType() + { + return gdl_preview_window_get_type(); + } + + /** + * Creates a new #GdlPreviewWindow + * + * Returns: New #GdlPreviewWindow item. + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this() + { + auto __p = gdl_preview_window_new(); + + if(__p is null) + { + throw new ConstructionException("null returned by new"); + } + + this(cast(GdlPreviewWindow*) __p); + } + + /** + * Update the size and position of the preview window. This function is + * called on drag_motion event to update the representation of the docking site + * in real time. + * + * Params: + * rect = the new position and size of the window + */ + public void update(GdkRectangle* rect) + { + gdl_preview_window_update(gdlPreviewWindow, rect); + } +} diff --git a/generated/gdl/gdl/Switcher.d b/generated/gdl/gdl/Switcher.d new file mode 100644 index 000000000..6533e9cc4 --- /dev/null +++ b/generated/gdl/gdl/Switcher.d @@ -0,0 +1,117 @@ +/* + * 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 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gdl.Switcher; + +private import gdkpixbuf.Pixbuf; +private import gdl.c.functions; +public import gdl.c.types; +private import glib.ConstructionException; +private import glib.Str; +private import gobject.ObjectG; +private import gtk.BuildableIF; +private import gtk.BuildableT; +private import gtk.Notebook; +private import gtk.Widget; + + +/** */ +public class Switcher : Notebook +{ + /** the main Gtk struct */ + protected GdlSwitcher* gdlSwitcher; + + /** Get the main Gtk struct */ + public GdlSwitcher* getSwitcherStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return gdlSwitcher; + } + + /** the main Gtk struct as a void* */ + protected override void* getStruct() + { + return cast(void*)gdlSwitcher; + } + + /** + * Sets our main struct and passes it to the parent class. + */ + public this (GdlSwitcher* gdlSwitcher, bool ownedRef = false) + { + this.gdlSwitcher = gdlSwitcher; + super(cast(GtkNotebook*)gdlSwitcher, ownedRef); + } + + + /** */ + public static GType getType() + { + return gdl_switcher_get_type(); + } + + /** + * Creates a new notebook widget with no pages. + * + * Returns: The newly created #GdlSwitcher + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this() + { + auto __p = gdl_switcher_new(); + + if(__p is null) + { + throw new ConstructionException("null returned by new"); + } + + this(cast(GdlSwitcher*) __p); + } + + /** + * Adds a page to a #GdlSwitcher. A button is created in the switcher, with its + * icon taken preferentially from the @stock_id parameter. If this parameter is + * %NULL, then the @pixbuf_icon parameter is used. Failing that, the + * %GTK_STOCK_NEW stock icon is used. The text label for the button is specified + * using the @label parameter. If it is %NULL then a default incrementally + * numbered label is used instead. + * + * Params: + * page = The page to add to the switcher + * tabWidget = The to add to the switcher + * label = The label text for the button + * tooltips = The tooltip for the button + * stockId = The stock ID for the button icon + * pixbufIcon = The pixbuf to use for the button icon + * position = The position at which to create the page + * + * Returns: The index (starting from 0) of the appended page in the notebook, or -1 if function fails + */ + public int insertPage(Widget page, Widget tabWidget, string label, string tooltips, string stockId, Pixbuf pixbufIcon, int position) + { + return gdl_switcher_insert_page(gdlSwitcher, (page is null) ? null : page.getWidgetStruct(), (tabWidget is null) ? null : tabWidget.getWidgetStruct(), Str.toStringz(label), Str.toStringz(tooltips), Str.toStringz(stockId), (pixbufIcon is null) ? null : pixbufIcon.getPixbufStruct(), position); + } +} diff --git a/generated/gdl/gdl/c/functions.d b/generated/gdl/gdl/c/functions.d new file mode 100644 index 000000000..5929bd73f --- /dev/null +++ b/generated/gdl/gdl/c/functions.d @@ -0,0 +1,596 @@ +/* + * 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 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gdl.c.functions; + +import std.stdio; +import gdl.c.types; +import gtkd.Loader; + +version (Windows) + static immutable LIBRARY_GDL = ["libgdl-3-5.dll;gdl-3-3.5.dll;gdl-3.dll"]; +else version (OSX) + static immutable LIBRARY_GDL = ["libgdl-3.5.dylib"]; +else + static immutable LIBRARY_GDL = ["libgdl-3.so.5"]; + +shared static this() +{ + // gdl.Dock + + Linker.link(gdl_dock_get_type, "gdl_dock_get_type", LIBRARY_GDL); + Linker.link(gdl_dock_new, "gdl_dock_new", LIBRARY_GDL); + Linker.link(gdl_dock_add_floating_item, "gdl_dock_add_floating_item", LIBRARY_GDL); + Linker.link(gdl_dock_add_item, "gdl_dock_add_item", LIBRARY_GDL); + Linker.link(gdl_dock_get_item_by_name, "gdl_dock_get_item_by_name", LIBRARY_GDL); + Linker.link(gdl_dock_get_named_items, "gdl_dock_get_named_items", LIBRARY_GDL); + Linker.link(gdl_dock_get_placeholder_by_name, "gdl_dock_get_placeholder_by_name", LIBRARY_GDL); + Linker.link(gdl_dock_get_root, "gdl_dock_get_root", LIBRARY_GDL); + Linker.link(gdl_dock_hide_preview, "gdl_dock_hide_preview", LIBRARY_GDL); + Linker.link(gdl_dock_new_from, "gdl_dock_new_from", LIBRARY_GDL); + Linker.link(gdl_dock_set_skip_taskbar, "gdl_dock_set_skip_taskbar", LIBRARY_GDL); + Linker.link(gdl_dock_show_preview, "gdl_dock_show_preview", LIBRARY_GDL); + Linker.link(gdl_dock_xor_rect, "gdl_dock_xor_rect", LIBRARY_GDL); + Linker.link(gdl_dock_xor_rect_hide, "gdl_dock_xor_rect_hide", LIBRARY_GDL); + + // gdl.DockBar + + Linker.link(gdl_dock_bar_get_type, "gdl_dock_bar_get_type", LIBRARY_GDL); + Linker.link(gdl_dock_bar_new, "gdl_dock_bar_new", LIBRARY_GDL); + Linker.link(gdl_dock_bar_get_orientation, "gdl_dock_bar_get_orientation", LIBRARY_GDL); + Linker.link(gdl_dock_bar_get_style, "gdl_dock_bar_get_style", LIBRARY_GDL); + Linker.link(gdl_dock_bar_set_orientation, "gdl_dock_bar_set_orientation", LIBRARY_GDL); + Linker.link(gdl_dock_bar_set_style, "gdl_dock_bar_set_style", LIBRARY_GDL); + + // gdl.DockItem + + Linker.link(gdl_dock_item_get_type, "gdl_dock_item_get_type", LIBRARY_GDL); + Linker.link(gdl_dock_item_new, "gdl_dock_item_new", LIBRARY_GDL); + Linker.link(gdl_dock_item_new_with_pixbuf_icon, "gdl_dock_item_new_with_pixbuf_icon", LIBRARY_GDL); + Linker.link(gdl_dock_item_new_with_stock, "gdl_dock_item_new_with_stock", LIBRARY_GDL); + Linker.link(gdl_dock_item_bind, "gdl_dock_item_bind", LIBRARY_GDL); + Linker.link(gdl_dock_item_dock_to, "gdl_dock_item_dock_to", LIBRARY_GDL); + Linker.link(gdl_dock_item_get_behavior_flags, "gdl_dock_item_get_behavior_flags", LIBRARY_GDL); + Linker.link(gdl_dock_item_get_child, "gdl_dock_item_get_child", LIBRARY_GDL); + Linker.link(gdl_dock_item_get_drag_area, "gdl_dock_item_get_drag_area", LIBRARY_GDL); + Linker.link(gdl_dock_item_get_grip, "gdl_dock_item_get_grip", LIBRARY_GDL); + Linker.link(gdl_dock_item_get_orientation, "gdl_dock_item_get_orientation", LIBRARY_GDL); + Linker.link(gdl_dock_item_get_tablabel, "gdl_dock_item_get_tablabel", LIBRARY_GDL); + Linker.link(gdl_dock_item_hide_grip, "gdl_dock_item_hide_grip", LIBRARY_GDL); + Linker.link(gdl_dock_item_hide_item, "gdl_dock_item_hide_item", LIBRARY_GDL); + Linker.link(gdl_dock_item_iconify_item, "gdl_dock_item_iconify_item", LIBRARY_GDL); + Linker.link(gdl_dock_item_is_closed, "gdl_dock_item_is_closed", LIBRARY_GDL); + Linker.link(gdl_dock_item_is_iconified, "gdl_dock_item_is_iconified", LIBRARY_GDL); + Linker.link(gdl_dock_item_is_placeholder, "gdl_dock_item_is_placeholder", LIBRARY_GDL); + Linker.link(gdl_dock_item_lock, "gdl_dock_item_lock", LIBRARY_GDL); + Linker.link(gdl_dock_item_notify_deselected, "gdl_dock_item_notify_deselected", LIBRARY_GDL); + Linker.link(gdl_dock_item_notify_selected, "gdl_dock_item_notify_selected", LIBRARY_GDL); + Linker.link(gdl_dock_item_or_child_has_focus, "gdl_dock_item_or_child_has_focus", LIBRARY_GDL); + Linker.link(gdl_dock_item_preferred_size, "gdl_dock_item_preferred_size", LIBRARY_GDL); + Linker.link(gdl_dock_item_set_behavior_flags, "gdl_dock_item_set_behavior_flags", LIBRARY_GDL); + Linker.link(gdl_dock_item_set_child, "gdl_dock_item_set_child", LIBRARY_GDL); + Linker.link(gdl_dock_item_set_default_position, "gdl_dock_item_set_default_position", LIBRARY_GDL); + Linker.link(gdl_dock_item_set_orientation, "gdl_dock_item_set_orientation", LIBRARY_GDL); + Linker.link(gdl_dock_item_set_tablabel, "gdl_dock_item_set_tablabel", LIBRARY_GDL); + Linker.link(gdl_dock_item_show_grip, "gdl_dock_item_show_grip", LIBRARY_GDL); + Linker.link(gdl_dock_item_show_item, "gdl_dock_item_show_item", LIBRARY_GDL); + Linker.link(gdl_dock_item_unbind, "gdl_dock_item_unbind", LIBRARY_GDL); + Linker.link(gdl_dock_item_unlock, "gdl_dock_item_unlock", LIBRARY_GDL); + Linker.link(gdl_dock_item_unset_behavior_flags, "gdl_dock_item_unset_behavior_flags", LIBRARY_GDL); + + // gdl.DockItemButtonImage + + Linker.link(gdl_dock_item_button_image_get_type, "gdl_dock_item_button_image_get_type", LIBRARY_GDL); + Linker.link(gdl_dock_item_button_image_new, "gdl_dock_item_button_image_new", LIBRARY_GDL); + + // gdl.DockItemClass + + Linker.link(gdl_dock_item_class_set_has_grip, "gdl_dock_item_class_set_has_grip", LIBRARY_GDL); + + // gdl.DockItemGrip + + Linker.link(gdl_dock_item_grip_get_type, "gdl_dock_item_grip_get_type", LIBRARY_GDL); + Linker.link(gdl_dock_item_grip_new, "gdl_dock_item_grip_new", LIBRARY_GDL); + Linker.link(gdl_dock_item_grip_has_event, "gdl_dock_item_grip_has_event", LIBRARY_GDL); + Linker.link(gdl_dock_item_grip_hide_handle, "gdl_dock_item_grip_hide_handle", LIBRARY_GDL); + Linker.link(gdl_dock_item_grip_set_cursor, "gdl_dock_item_grip_set_cursor", LIBRARY_GDL); + Linker.link(gdl_dock_item_grip_set_label, "gdl_dock_item_grip_set_label", LIBRARY_GDL); + Linker.link(gdl_dock_item_grip_show_handle, "gdl_dock_item_grip_show_handle", LIBRARY_GDL); + + // gdl.DockLayout + + Linker.link(gdl_dock_layout_get_type, "gdl_dock_layout_get_type", LIBRARY_GDL); + Linker.link(gdl_dock_layout_new, "gdl_dock_layout_new", LIBRARY_GDL); + Linker.link(gdl_dock_layout_attach, "gdl_dock_layout_attach", LIBRARY_GDL); + Linker.link(gdl_dock_layout_delete_layout, "gdl_dock_layout_delete_layout", LIBRARY_GDL); + Linker.link(gdl_dock_layout_get_layouts, "gdl_dock_layout_get_layouts", LIBRARY_GDL); + Linker.link(gdl_dock_layout_get_master, "gdl_dock_layout_get_master", LIBRARY_GDL); + Linker.link(gdl_dock_layout_is_dirty, "gdl_dock_layout_is_dirty", LIBRARY_GDL); + Linker.link(gdl_dock_layout_load_from_file, "gdl_dock_layout_load_from_file", LIBRARY_GDL); + Linker.link(gdl_dock_layout_load_layout, "gdl_dock_layout_load_layout", LIBRARY_GDL); + Linker.link(gdl_dock_layout_save_layout, "gdl_dock_layout_save_layout", LIBRARY_GDL); + Linker.link(gdl_dock_layout_save_to_file, "gdl_dock_layout_save_to_file", LIBRARY_GDL); + Linker.link(gdl_dock_layout_set_master, "gdl_dock_layout_set_master", LIBRARY_GDL); + + // gdl.DockMaster + + Linker.link(gdl_dock_master_get_type, "gdl_dock_master_get_type", LIBRARY_GDL); + Linker.link(gdl_dock_master_add, "gdl_dock_master_add", LIBRARY_GDL); + Linker.link(gdl_dock_master_foreach, "gdl_dock_master_foreach", LIBRARY_GDL); + Linker.link(gdl_dock_master_foreach_toplevel, "gdl_dock_master_foreach_toplevel", LIBRARY_GDL); + Linker.link(gdl_dock_master_get_controller, "gdl_dock_master_get_controller", LIBRARY_GDL); + Linker.link(gdl_dock_master_get_dock_name, "gdl_dock_master_get_dock_name", LIBRARY_GDL); + Linker.link(gdl_dock_master_get_object, "gdl_dock_master_get_object", LIBRARY_GDL); + Linker.link(gdl_dock_master_remove, "gdl_dock_master_remove", LIBRARY_GDL); + Linker.link(gdl_dock_master_set_controller, "gdl_dock_master_set_controller", LIBRARY_GDL); + + // gdl.DockNotebook + + Linker.link(gdl_dock_notebook_get_type, "gdl_dock_notebook_get_type", LIBRARY_GDL); + Linker.link(gdl_dock_notebook_new, "gdl_dock_notebook_new", LIBRARY_GDL); + + // gdl.DockObject + + Linker.link(gdl_dock_object_get_type, "gdl_dock_object_get_type", LIBRARY_GDL); + Linker.link(gdl_dock_object_nick_from_type, "gdl_dock_object_nick_from_type", LIBRARY_GDL); + Linker.link(gdl_dock_object_set_type_for_nick, "gdl_dock_object_set_type_for_nick", LIBRARY_GDL); + Linker.link(gdl_dock_object_type_from_nick, "gdl_dock_object_type_from_nick", LIBRARY_GDL); + Linker.link(gdl_dock_object_bind, "gdl_dock_object_bind", LIBRARY_GDL); + Linker.link(gdl_dock_object_child_placement, "gdl_dock_object_child_placement", LIBRARY_GDL); + Linker.link(gdl_dock_object_detach, "gdl_dock_object_detach", LIBRARY_GDL); + Linker.link(gdl_dock_object_dock, "gdl_dock_object_dock", LIBRARY_GDL); + Linker.link(gdl_dock_object_dock_request, "gdl_dock_object_dock_request", LIBRARY_GDL); + Linker.link(gdl_dock_object_freeze, "gdl_dock_object_freeze", LIBRARY_GDL); + Linker.link(gdl_dock_object_get_controller, "gdl_dock_object_get_controller", LIBRARY_GDL); + Linker.link(gdl_dock_object_get_long_name, "gdl_dock_object_get_long_name", LIBRARY_GDL); + Linker.link(gdl_dock_object_get_master, "gdl_dock_object_get_master", LIBRARY_GDL); + Linker.link(gdl_dock_object_get_name, "gdl_dock_object_get_name", LIBRARY_GDL); + Linker.link(gdl_dock_object_get_parent_object, "gdl_dock_object_get_parent_object", LIBRARY_GDL); + Linker.link(gdl_dock_object_get_pixbuf, "gdl_dock_object_get_pixbuf", LIBRARY_GDL); + Linker.link(gdl_dock_object_get_stock_id, "gdl_dock_object_get_stock_id", LIBRARY_GDL); + Linker.link(gdl_dock_object_get_toplevel, "gdl_dock_object_get_toplevel", LIBRARY_GDL); + Linker.link(gdl_dock_object_is_automatic, "gdl_dock_object_is_automatic", LIBRARY_GDL); + Linker.link(gdl_dock_object_is_bound, "gdl_dock_object_is_bound", LIBRARY_GDL); + Linker.link(gdl_dock_object_is_closed, "gdl_dock_object_is_closed", LIBRARY_GDL); + Linker.link(gdl_dock_object_is_compound, "gdl_dock_object_is_compound", LIBRARY_GDL); + Linker.link(gdl_dock_object_is_frozen, "gdl_dock_object_is_frozen", LIBRARY_GDL); + Linker.link(gdl_dock_object_layout_changed_notify, "gdl_dock_object_layout_changed_notify", LIBRARY_GDL); + Linker.link(gdl_dock_object_present, "gdl_dock_object_present", LIBRARY_GDL); + Linker.link(gdl_dock_object_reduce, "gdl_dock_object_reduce", LIBRARY_GDL); + Linker.link(gdl_dock_object_reorder, "gdl_dock_object_reorder", LIBRARY_GDL); + Linker.link(gdl_dock_object_set_long_name, "gdl_dock_object_set_long_name", LIBRARY_GDL); + Linker.link(gdl_dock_object_set_manual, "gdl_dock_object_set_manual", LIBRARY_GDL); + Linker.link(gdl_dock_object_set_name, "gdl_dock_object_set_name", LIBRARY_GDL); + Linker.link(gdl_dock_object_set_pixbuf, "gdl_dock_object_set_pixbuf", LIBRARY_GDL); + Linker.link(gdl_dock_object_set_stock_id, "gdl_dock_object_set_stock_id", LIBRARY_GDL); + Linker.link(gdl_dock_object_thaw, "gdl_dock_object_thaw", LIBRARY_GDL); + Linker.link(gdl_dock_object_unbind, "gdl_dock_object_unbind", LIBRARY_GDL); + + // gdl.DockPaned + + Linker.link(gdl_dock_paned_get_type, "gdl_dock_paned_get_type", LIBRARY_GDL); + Linker.link(gdl_dock_paned_new, "gdl_dock_paned_new", LIBRARY_GDL); + + // gdl.DockParam + + Linker.link(gdl_dock_param_get_type, "gdl_dock_param_get_type", LIBRARY_GDL); + + // gdl.DockPlaceholder + + Linker.link(gdl_dock_placeholder_get_type, "gdl_dock_placeholder_get_type", LIBRARY_GDL); + Linker.link(gdl_dock_placeholder_new, "gdl_dock_placeholder_new", LIBRARY_GDL); + Linker.link(gdl_dock_placeholder_attach, "gdl_dock_placeholder_attach", LIBRARY_GDL); + + // gdl.DockTablabel + + Linker.link(gdl_dock_tablabel_get_type, "gdl_dock_tablabel_get_type", LIBRARY_GDL); + Linker.link(gdl_dock_tablabel_new, "gdl_dock_tablabel_new", LIBRARY_GDL); + Linker.link(gdl_dock_tablabel_activate, "gdl_dock_tablabel_activate", LIBRARY_GDL); + Linker.link(gdl_dock_tablabel_deactivate, "gdl_dock_tablabel_deactivate", LIBRARY_GDL); + + // gdl.PreviewWindow + + Linker.link(gdl_preview_window_get_type, "gdl_preview_window_get_type", LIBRARY_GDL); + Linker.link(gdl_preview_window_new, "gdl_preview_window_new", LIBRARY_GDL); + Linker.link(gdl_preview_window_update, "gdl_preview_window_update", LIBRARY_GDL); + + // gdl.Switcher + + Linker.link(gdl_switcher_get_type, "gdl_switcher_get_type", LIBRARY_GDL); + Linker.link(gdl_switcher_new, "gdl_switcher_new", LIBRARY_GDL); + Linker.link(gdl_switcher_insert_page, "gdl_switcher_insert_page", LIBRARY_GDL); +} + +__gshared extern(C) +{ + + // gdl.Dock + + GType function() c_gdl_dock_get_type; + GtkWidget* function() c_gdl_dock_new; + void function(GdlDock* dock, GdlDockItem* item, int x, int y, int width, int height) c_gdl_dock_add_floating_item; + void function(GdlDock* dock, GdlDockItem* item, GdlDockPlacement placement) c_gdl_dock_add_item; + GdlDockItem* function(GdlDock* dock, const(char)* name) c_gdl_dock_get_item_by_name; + GList* function(GdlDock* dock) c_gdl_dock_get_named_items; + GdlDockPlaceholder* function(GdlDock* dock, const(char)* name) c_gdl_dock_get_placeholder_by_name; + GdlDockObject* function(GdlDock* dock) c_gdl_dock_get_root; + void function(GdlDock* dock) c_gdl_dock_hide_preview; + GtkWidget* function(GdlDock* original, int floating) c_gdl_dock_new_from; + void function(GdlDock* dock, int skip) c_gdl_dock_set_skip_taskbar; + void function(GdlDock* dock, GdkRectangle* rect) c_gdl_dock_show_preview; + void function(GdlDock* dock, GdkRectangle* rect) c_gdl_dock_xor_rect; + void function(GdlDock* dock) c_gdl_dock_xor_rect_hide; + + // gdl.DockBar + + GType function() c_gdl_dock_bar_get_type; + GtkWidget* function(GObject* master) c_gdl_dock_bar_new; + GtkOrientation function(GdlDockBar* dockbar) c_gdl_dock_bar_get_orientation; + GdlDockBarStyle function(GdlDockBar* dockbar) c_gdl_dock_bar_get_style; + void function(GdlDockBar* dockbar, GtkOrientation orientation) c_gdl_dock_bar_set_orientation; + void function(GdlDockBar* dockbar, GdlDockBarStyle style) c_gdl_dock_bar_set_style; + + // gdl.DockItem + + GType function() c_gdl_dock_item_get_type; + GtkWidget* function(const(char)* name, const(char)* longName, GdlDockItemBehavior behavior) c_gdl_dock_item_new; + GtkWidget* function(const(char)* name, const(char)* longName, GdkPixbuf* pixbufIcon, GdlDockItemBehavior behavior) c_gdl_dock_item_new_with_pixbuf_icon; + GtkWidget* function(const(char)* name, const(char)* longName, const(char)* stockId, GdlDockItemBehavior behavior) c_gdl_dock_item_new_with_stock; + void function(GdlDockItem* item, GtkWidget* dock) c_gdl_dock_item_bind; + void function(GdlDockItem* item, GdlDockItem* target, GdlDockPlacement position, int dockingParam) c_gdl_dock_item_dock_to; + GdlDockItemBehavior function(GdlDockItem* item) c_gdl_dock_item_get_behavior_flags; + GtkWidget* function(GdlDockItem* item) c_gdl_dock_item_get_child; + void function(GdlDockItem* item, GdkRectangle* rect) c_gdl_dock_item_get_drag_area; + GtkWidget* function(GdlDockItem* item) c_gdl_dock_item_get_grip; + GtkOrientation function(GdlDockItem* item) c_gdl_dock_item_get_orientation; + GtkWidget* function(GdlDockItem* item) c_gdl_dock_item_get_tablabel; + void function(GdlDockItem* item) c_gdl_dock_item_hide_grip; + void function(GdlDockItem* item) c_gdl_dock_item_hide_item; + void function(GdlDockItem* item) c_gdl_dock_item_iconify_item; + int function(GdlDockItem* item) c_gdl_dock_item_is_closed; + int function(GdlDockItem* item) c_gdl_dock_item_is_iconified; + int function(GdlDockItem* item) c_gdl_dock_item_is_placeholder; + void function(GdlDockItem* item) c_gdl_dock_item_lock; + void function(GdlDockItem* item) c_gdl_dock_item_notify_deselected; + void function(GdlDockItem* item) c_gdl_dock_item_notify_selected; + int function(GdlDockItem* item) c_gdl_dock_item_or_child_has_focus; + void function(GdlDockItem* item, GtkRequisition* req) c_gdl_dock_item_preferred_size; + void function(GdlDockItem* item, GdlDockItemBehavior behavior, int clear) c_gdl_dock_item_set_behavior_flags; + void function(GdlDockItem* item, GtkWidget* child) c_gdl_dock_item_set_child; + void function(GdlDockItem* item, GdlDockObject* reference) c_gdl_dock_item_set_default_position; + void function(GdlDockItem* item, GtkOrientation orientation) c_gdl_dock_item_set_orientation; + void function(GdlDockItem* item, GtkWidget* tablabel) c_gdl_dock_item_set_tablabel; + void function(GdlDockItem* item) c_gdl_dock_item_show_grip; + void function(GdlDockItem* item) c_gdl_dock_item_show_item; + void function(GdlDockItem* item) c_gdl_dock_item_unbind; + void function(GdlDockItem* item) c_gdl_dock_item_unlock; + void function(GdlDockItem* item, GdlDockItemBehavior behavior) c_gdl_dock_item_unset_behavior_flags; + + // gdl.DockItemButtonImage + + GType function() c_gdl_dock_item_button_image_get_type; + GtkWidget* function(GdlDockItemButtonImageType imageType) c_gdl_dock_item_button_image_new; + + // gdl.DockItemClass + + void function(GdlDockItemClass* itemClass, int hasGrip) c_gdl_dock_item_class_set_has_grip; + + // gdl.DockItemGrip + + GType function() c_gdl_dock_item_grip_get_type; + GtkWidget* function(GdlDockItem* item) c_gdl_dock_item_grip_new; + int function(GdlDockItemGrip* grip, GdkEvent* event) c_gdl_dock_item_grip_has_event; + void function(GdlDockItemGrip* grip) c_gdl_dock_item_grip_hide_handle; + void function(GdlDockItemGrip* grip, int inDrag) c_gdl_dock_item_grip_set_cursor; + void function(GdlDockItemGrip* grip, GtkWidget* label) c_gdl_dock_item_grip_set_label; + void function(GdlDockItemGrip* grip) c_gdl_dock_item_grip_show_handle; + + // gdl.DockLayout + + GType function() c_gdl_dock_layout_get_type; + GdlDockLayout* function(GObject* master) c_gdl_dock_layout_new; + void function(GdlDockLayout* layout, GdlDockMaster* master) c_gdl_dock_layout_attach; + void function(GdlDockLayout* layout, const(char)* name) c_gdl_dock_layout_delete_layout; + GList* function(GdlDockLayout* layout, int includeDefault) c_gdl_dock_layout_get_layouts; + GObject* function(GdlDockLayout* layout) c_gdl_dock_layout_get_master; + int function(GdlDockLayout* layout) c_gdl_dock_layout_is_dirty; + int function(GdlDockLayout* layout, const(char)* filename) c_gdl_dock_layout_load_from_file; + int function(GdlDockLayout* layout, const(char)* name) c_gdl_dock_layout_load_layout; + void function(GdlDockLayout* layout, const(char)* name) c_gdl_dock_layout_save_layout; + int function(GdlDockLayout* layout, const(char)* filename) c_gdl_dock_layout_save_to_file; + void function(GdlDockLayout* layout, GObject* master) c_gdl_dock_layout_set_master; + + // gdl.DockMaster + + GType function() c_gdl_dock_master_get_type; + void function(GdlDockMaster* master, GdlDockObject* object) c_gdl_dock_master_add; + void function(GdlDockMaster* master, GFunc function_, void* userData) c_gdl_dock_master_foreach; + void function(GdlDockMaster* master, int includeController, GFunc function_, void* userData) c_gdl_dock_master_foreach_toplevel; + GdlDockObject* function(GdlDockMaster* master) c_gdl_dock_master_get_controller; + char* function(GdlDockMaster* master) c_gdl_dock_master_get_dock_name; + GdlDockObject* function(GdlDockMaster* master, const(char)* nickName) c_gdl_dock_master_get_object; + void function(GdlDockMaster* master, GdlDockObject* object) c_gdl_dock_master_remove; + void function(GdlDockMaster* master, GdlDockObject* newController) c_gdl_dock_master_set_controller; + + // gdl.DockNotebook + + GType function() c_gdl_dock_notebook_get_type; + GtkWidget* function() c_gdl_dock_notebook_new; + + // gdl.DockObject + + GType function() c_gdl_dock_object_get_type; + const(char)* function(GType type) c_gdl_dock_object_nick_from_type; + GType function(const(char)* nick, GType type) c_gdl_dock_object_set_type_for_nick; + GType function(const(char)* nick) c_gdl_dock_object_type_from_nick; + void function(GdlDockObject* object, GObject* master) c_gdl_dock_object_bind; + int function(GdlDockObject* object, GdlDockObject* child, GdlDockPlacement* placement) c_gdl_dock_object_child_placement; + void function(GdlDockObject* object, int recursive) c_gdl_dock_object_detach; + void function(GdlDockObject* object, GdlDockObject* requestor, GdlDockPlacement position, GValue* otherData) c_gdl_dock_object_dock; + int function(GdlDockObject* object, int x, int y, GdlDockRequest* request) c_gdl_dock_object_dock_request; + void function(GdlDockObject* object) c_gdl_dock_object_freeze; + GdlDockObject* function(GdlDockObject* object) c_gdl_dock_object_get_controller; + const(char)* function(GdlDockObject* object) c_gdl_dock_object_get_long_name; + GObject* function(GdlDockObject* object) c_gdl_dock_object_get_master; + const(char)* function(GdlDockObject* object) c_gdl_dock_object_get_name; + GdlDockObject* function(GdlDockObject* object) c_gdl_dock_object_get_parent_object; + GdkPixbuf* function(GdlDockObject* object) c_gdl_dock_object_get_pixbuf; + const(char)* function(GdlDockObject* object) c_gdl_dock_object_get_stock_id; + GdlDock* function(GdlDockObject* object) c_gdl_dock_object_get_toplevel; + int function(GdlDockObject* object) c_gdl_dock_object_is_automatic; + int function(GdlDockObject* object) c_gdl_dock_object_is_bound; + int function(GdlDockObject* object) c_gdl_dock_object_is_closed; + int function(GdlDockObject* object) c_gdl_dock_object_is_compound; + int function(GdlDockObject* object) c_gdl_dock_object_is_frozen; + void function(GdlDockObject* object) c_gdl_dock_object_layout_changed_notify; + void function(GdlDockObject* object, GdlDockObject* child) c_gdl_dock_object_present; + void function(GdlDockObject* object) c_gdl_dock_object_reduce; + int function(GdlDockObject* object, GdlDockObject* child, GdlDockPlacement newPosition, GValue* otherData) c_gdl_dock_object_reorder; + void function(GdlDockObject* object, const(char)* name) c_gdl_dock_object_set_long_name; + void function(GdlDockObject* object) c_gdl_dock_object_set_manual; + void function(GdlDockObject* object, const(char)* name) c_gdl_dock_object_set_name; + void function(GdlDockObject* object, GdkPixbuf* icon) c_gdl_dock_object_set_pixbuf; + void function(GdlDockObject* object, const(char)* stockId) c_gdl_dock_object_set_stock_id; + void function(GdlDockObject* object) c_gdl_dock_object_thaw; + void function(GdlDockObject* object) c_gdl_dock_object_unbind; + + // gdl.DockPaned + + GType function() c_gdl_dock_paned_get_type; + GtkWidget* function(GtkOrientation orientation) c_gdl_dock_paned_new; + + // gdl.DockParam + + GType function() c_gdl_dock_param_get_type; + + // gdl.DockPlaceholder + + GType function() c_gdl_dock_placeholder_get_type; + GtkWidget* function(const(char)* name, GdlDockObject* object, GdlDockPlacement position, int sticky) c_gdl_dock_placeholder_new; + void function(GdlDockPlaceholder* ph, GdlDockObject* object) c_gdl_dock_placeholder_attach; + + // gdl.DockTablabel + + GType function() c_gdl_dock_tablabel_get_type; + GtkWidget* function(GdlDockItem* item) c_gdl_dock_tablabel_new; + void function(GdlDockTablabel* tablabel) c_gdl_dock_tablabel_activate; + void function(GdlDockTablabel* tablabel) c_gdl_dock_tablabel_deactivate; + + // gdl.PreviewWindow + + GType function() c_gdl_preview_window_get_type; + GtkWidget* function() c_gdl_preview_window_new; + void function(GdlPreviewWindow* window, GdkRectangle* rect) c_gdl_preview_window_update; + + // gdl.Switcher + + GType function() c_gdl_switcher_get_type; + GtkWidget* function() c_gdl_switcher_new; + int function(GdlSwitcher* switcher, GtkWidget* page, GtkWidget* tabWidget, const(char)* label, const(char)* tooltips, const(char)* stockId, GdkPixbuf* pixbufIcon, int position) c_gdl_switcher_insert_page; +} + + +// gdl.Dock + +alias c_gdl_dock_get_type gdl_dock_get_type; +alias c_gdl_dock_new gdl_dock_new; +alias c_gdl_dock_add_floating_item gdl_dock_add_floating_item; +alias c_gdl_dock_add_item gdl_dock_add_item; +alias c_gdl_dock_get_item_by_name gdl_dock_get_item_by_name; +alias c_gdl_dock_get_named_items gdl_dock_get_named_items; +alias c_gdl_dock_get_placeholder_by_name gdl_dock_get_placeholder_by_name; +alias c_gdl_dock_get_root gdl_dock_get_root; +alias c_gdl_dock_hide_preview gdl_dock_hide_preview; +alias c_gdl_dock_new_from gdl_dock_new_from; +alias c_gdl_dock_set_skip_taskbar gdl_dock_set_skip_taskbar; +alias c_gdl_dock_show_preview gdl_dock_show_preview; +alias c_gdl_dock_xor_rect gdl_dock_xor_rect; +alias c_gdl_dock_xor_rect_hide gdl_dock_xor_rect_hide; + +// gdl.DockBar + +alias c_gdl_dock_bar_get_type gdl_dock_bar_get_type; +alias c_gdl_dock_bar_new gdl_dock_bar_new; +alias c_gdl_dock_bar_get_orientation gdl_dock_bar_get_orientation; +alias c_gdl_dock_bar_get_style gdl_dock_bar_get_style; +alias c_gdl_dock_bar_set_orientation gdl_dock_bar_set_orientation; +alias c_gdl_dock_bar_set_style gdl_dock_bar_set_style; + +// gdl.DockItem + +alias c_gdl_dock_item_get_type gdl_dock_item_get_type; +alias c_gdl_dock_item_new gdl_dock_item_new; +alias c_gdl_dock_item_new_with_pixbuf_icon gdl_dock_item_new_with_pixbuf_icon; +alias c_gdl_dock_item_new_with_stock gdl_dock_item_new_with_stock; +alias c_gdl_dock_item_bind gdl_dock_item_bind; +alias c_gdl_dock_item_dock_to gdl_dock_item_dock_to; +alias c_gdl_dock_item_get_behavior_flags gdl_dock_item_get_behavior_flags; +alias c_gdl_dock_item_get_child gdl_dock_item_get_child; +alias c_gdl_dock_item_get_drag_area gdl_dock_item_get_drag_area; +alias c_gdl_dock_item_get_grip gdl_dock_item_get_grip; +alias c_gdl_dock_item_get_orientation gdl_dock_item_get_orientation; +alias c_gdl_dock_item_get_tablabel gdl_dock_item_get_tablabel; +alias c_gdl_dock_item_hide_grip gdl_dock_item_hide_grip; +alias c_gdl_dock_item_hide_item gdl_dock_item_hide_item; +alias c_gdl_dock_item_iconify_item gdl_dock_item_iconify_item; +alias c_gdl_dock_item_is_closed gdl_dock_item_is_closed; +alias c_gdl_dock_item_is_iconified gdl_dock_item_is_iconified; +alias c_gdl_dock_item_is_placeholder gdl_dock_item_is_placeholder; +alias c_gdl_dock_item_lock gdl_dock_item_lock; +alias c_gdl_dock_item_notify_deselected gdl_dock_item_notify_deselected; +alias c_gdl_dock_item_notify_selected gdl_dock_item_notify_selected; +alias c_gdl_dock_item_or_child_has_focus gdl_dock_item_or_child_has_focus; +alias c_gdl_dock_item_preferred_size gdl_dock_item_preferred_size; +alias c_gdl_dock_item_set_behavior_flags gdl_dock_item_set_behavior_flags; +alias c_gdl_dock_item_set_child gdl_dock_item_set_child; +alias c_gdl_dock_item_set_default_position gdl_dock_item_set_default_position; +alias c_gdl_dock_item_set_orientation gdl_dock_item_set_orientation; +alias c_gdl_dock_item_set_tablabel gdl_dock_item_set_tablabel; +alias c_gdl_dock_item_show_grip gdl_dock_item_show_grip; +alias c_gdl_dock_item_show_item gdl_dock_item_show_item; +alias c_gdl_dock_item_unbind gdl_dock_item_unbind; +alias c_gdl_dock_item_unlock gdl_dock_item_unlock; +alias c_gdl_dock_item_unset_behavior_flags gdl_dock_item_unset_behavior_flags; + +// gdl.DockItemButtonImage + +alias c_gdl_dock_item_button_image_get_type gdl_dock_item_button_image_get_type; +alias c_gdl_dock_item_button_image_new gdl_dock_item_button_image_new; + +// gdl.DockItemClass + +alias c_gdl_dock_item_class_set_has_grip gdl_dock_item_class_set_has_grip; + +// gdl.DockItemGrip + +alias c_gdl_dock_item_grip_get_type gdl_dock_item_grip_get_type; +alias c_gdl_dock_item_grip_new gdl_dock_item_grip_new; +alias c_gdl_dock_item_grip_has_event gdl_dock_item_grip_has_event; +alias c_gdl_dock_item_grip_hide_handle gdl_dock_item_grip_hide_handle; +alias c_gdl_dock_item_grip_set_cursor gdl_dock_item_grip_set_cursor; +alias c_gdl_dock_item_grip_set_label gdl_dock_item_grip_set_label; +alias c_gdl_dock_item_grip_show_handle gdl_dock_item_grip_show_handle; + +// gdl.DockLayout + +alias c_gdl_dock_layout_get_type gdl_dock_layout_get_type; +alias c_gdl_dock_layout_new gdl_dock_layout_new; +alias c_gdl_dock_layout_attach gdl_dock_layout_attach; +alias c_gdl_dock_layout_delete_layout gdl_dock_layout_delete_layout; +alias c_gdl_dock_layout_get_layouts gdl_dock_layout_get_layouts; +alias c_gdl_dock_layout_get_master gdl_dock_layout_get_master; +alias c_gdl_dock_layout_is_dirty gdl_dock_layout_is_dirty; +alias c_gdl_dock_layout_load_from_file gdl_dock_layout_load_from_file; +alias c_gdl_dock_layout_load_layout gdl_dock_layout_load_layout; +alias c_gdl_dock_layout_save_layout gdl_dock_layout_save_layout; +alias c_gdl_dock_layout_save_to_file gdl_dock_layout_save_to_file; +alias c_gdl_dock_layout_set_master gdl_dock_layout_set_master; + +// gdl.DockMaster + +alias c_gdl_dock_master_get_type gdl_dock_master_get_type; +alias c_gdl_dock_master_add gdl_dock_master_add; +alias c_gdl_dock_master_foreach gdl_dock_master_foreach; +alias c_gdl_dock_master_foreach_toplevel gdl_dock_master_foreach_toplevel; +alias c_gdl_dock_master_get_controller gdl_dock_master_get_controller; +alias c_gdl_dock_master_get_dock_name gdl_dock_master_get_dock_name; +alias c_gdl_dock_master_get_object gdl_dock_master_get_object; +alias c_gdl_dock_master_remove gdl_dock_master_remove; +alias c_gdl_dock_master_set_controller gdl_dock_master_set_controller; + +// gdl.DockNotebook + +alias c_gdl_dock_notebook_get_type gdl_dock_notebook_get_type; +alias c_gdl_dock_notebook_new gdl_dock_notebook_new; + +// gdl.DockObject + +alias c_gdl_dock_object_get_type gdl_dock_object_get_type; +alias c_gdl_dock_object_nick_from_type gdl_dock_object_nick_from_type; +alias c_gdl_dock_object_set_type_for_nick gdl_dock_object_set_type_for_nick; +alias c_gdl_dock_object_type_from_nick gdl_dock_object_type_from_nick; +alias c_gdl_dock_object_bind gdl_dock_object_bind; +alias c_gdl_dock_object_child_placement gdl_dock_object_child_placement; +alias c_gdl_dock_object_detach gdl_dock_object_detach; +alias c_gdl_dock_object_dock gdl_dock_object_dock; +alias c_gdl_dock_object_dock_request gdl_dock_object_dock_request; +alias c_gdl_dock_object_freeze gdl_dock_object_freeze; +alias c_gdl_dock_object_get_controller gdl_dock_object_get_controller; +alias c_gdl_dock_object_get_long_name gdl_dock_object_get_long_name; +alias c_gdl_dock_object_get_master gdl_dock_object_get_master; +alias c_gdl_dock_object_get_name gdl_dock_object_get_name; +alias c_gdl_dock_object_get_parent_object gdl_dock_object_get_parent_object; +alias c_gdl_dock_object_get_pixbuf gdl_dock_object_get_pixbuf; +alias c_gdl_dock_object_get_stock_id gdl_dock_object_get_stock_id; +alias c_gdl_dock_object_get_toplevel gdl_dock_object_get_toplevel; +alias c_gdl_dock_object_is_automatic gdl_dock_object_is_automatic; +alias c_gdl_dock_object_is_bound gdl_dock_object_is_bound; +alias c_gdl_dock_object_is_closed gdl_dock_object_is_closed; +alias c_gdl_dock_object_is_compound gdl_dock_object_is_compound; +alias c_gdl_dock_object_is_frozen gdl_dock_object_is_frozen; +alias c_gdl_dock_object_layout_changed_notify gdl_dock_object_layout_changed_notify; +alias c_gdl_dock_object_present gdl_dock_object_present; +alias c_gdl_dock_object_reduce gdl_dock_object_reduce; +alias c_gdl_dock_object_reorder gdl_dock_object_reorder; +alias c_gdl_dock_object_set_long_name gdl_dock_object_set_long_name; +alias c_gdl_dock_object_set_manual gdl_dock_object_set_manual; +alias c_gdl_dock_object_set_name gdl_dock_object_set_name; +alias c_gdl_dock_object_set_pixbuf gdl_dock_object_set_pixbuf; +alias c_gdl_dock_object_set_stock_id gdl_dock_object_set_stock_id; +alias c_gdl_dock_object_thaw gdl_dock_object_thaw; +alias c_gdl_dock_object_unbind gdl_dock_object_unbind; + +// gdl.DockPaned + +alias c_gdl_dock_paned_get_type gdl_dock_paned_get_type; +alias c_gdl_dock_paned_new gdl_dock_paned_new; + +// gdl.DockParam + +alias c_gdl_dock_param_get_type gdl_dock_param_get_type; + +// gdl.DockPlaceholder + +alias c_gdl_dock_placeholder_get_type gdl_dock_placeholder_get_type; +alias c_gdl_dock_placeholder_new gdl_dock_placeholder_new; +alias c_gdl_dock_placeholder_attach gdl_dock_placeholder_attach; + +// gdl.DockTablabel + +alias c_gdl_dock_tablabel_get_type gdl_dock_tablabel_get_type; +alias c_gdl_dock_tablabel_new gdl_dock_tablabel_new; +alias c_gdl_dock_tablabel_activate gdl_dock_tablabel_activate; +alias c_gdl_dock_tablabel_deactivate gdl_dock_tablabel_deactivate; + +// gdl.PreviewWindow + +alias c_gdl_preview_window_get_type gdl_preview_window_get_type; +alias c_gdl_preview_window_new gdl_preview_window_new; +alias c_gdl_preview_window_update gdl_preview_window_update; + +// gdl.Switcher + +alias c_gdl_switcher_get_type gdl_switcher_get_type; +alias c_gdl_switcher_new gdl_switcher_new; +alias c_gdl_switcher_insert_page gdl_switcher_insert_page; diff --git a/generated/gdl/gdl/c/types.d b/generated/gdl/gdl/c/types.d new file mode 100644 index 000000000..a9980b915 --- /dev/null +++ b/generated/gdl/gdl/c/types.d @@ -0,0 +1,565 @@ +/* + * 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 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gdl.c.types; + +public import gdk.c.types; +public import gdkpixbuf.c.types; +public import glib.c.types; +public import gobject.c.types; +public import gtk.c.types; + + +/** + * Used to customize the appearance of a #GdlDockBar. + */ +public enum GdlDockBarStyle +{ + /** + * Buttons display only icons in the dockbar. + */ + ICONS = 0, + /** + * Buttons display only text labels in the dockbar. + */ + TEXT = 1, + /** + * Buttons display text and icons in the dockbar. + */ + BOTH = 2, + /** + * identical to @GDL_DOCK_BAR_BOTH. + */ + AUTO = 3, +} +alias GdlDockBarStyle DockBarStyle; + +/** + * Described the behaviour of a doc item. The item can have multiple flags set. + */ +public enum GdlDockItemBehavior +{ + /** + * Normal dock item + */ + NORMAL = 0, + /** + * item cannot be undocked + */ + NEVER_FLOATING = 1, + /** + * item cannot be docked vertically + */ + NEVER_VERTICAL = 2, + /** + * item cannot be docked horizontally + */ + NEVER_HORIZONTAL = 4, + /** + * item is locked, it cannot be moved around + */ + LOCKED = 8, + /** + * item cannot be docked at top + */ + CANT_DOCK_TOP = 16, + /** + * item cannot be docked at bottom + */ + CANT_DOCK_BOTTOM = 32, + /** + * item cannot be docked left + */ + CANT_DOCK_LEFT = 64, + /** + * item cannot be docked right + */ + CANT_DOCK_RIGHT = 128, + /** + * item cannot be docked at center + */ + CANT_DOCK_CENTER = 256, + /** + * item cannot be closed + */ + CANT_CLOSE = 512, + /** + * item cannot be iconified + */ + CANT_ICONIFY = 1024, + /** + * item doesn't have a grip + */ + NO_GRIP = 2048, +} +alias GdlDockItemBehavior DockItemBehavior; + +/** + * Define the image displayed. + */ +public enum GdlDockItemButtonImageType +{ + /** + * Display a small cross + */ + CLOSE = 0, + /** + * Display a small triangle + */ + ICONIFY = 1, +} +alias GdlDockItemButtonImageType DockItemButtonImageType; + +/** + * Status flag of a GdlDockItem. Don't use unless you derive a widget from GdlDockItem + * + * Deprecated: Use your own private data instead. + */ +public enum GdlDockItemFlags +{ + /** + * item is in a drag operation + */ + IN_DRAG = 256, + /** + * item is in a predrag operation + */ + IN_PREDRAG = 512, + /** + * item is iconified + */ + ICONIFIED = 1024, + /** + * indicates the user has started an action on the dock item + */ + USER_ACTION = 2048, +} +alias GdlDockItemFlags DockItemFlags; + +/** + * Described the state of a #GdlDockObject. + * + * Since 3.6: These flags are available using access function, like + * gdl_dock_object_is_automatic() or gdl_dock_object_is_closed(). + */ +public enum GdlDockObjectFlags +{ + /** + * Object is created and destroyed by the master, not the user + */ + AUTOMATIC = 1, + /** + * Object has a parent + */ + ATTACHED = 2, + /** + * Object is currently part of a rearrangement + */ + IN_REFLOW = 4, + /** + * Object will be removed + */ + IN_DETACH = 8, +} +alias GdlDockObjectFlags DockObjectFlags; + +/** + * Used to flag additional characteristics to GObject properties used in dock + * object. + */ +public enum GdlDockParamFlags +{ + /** + * The parameter is to be exported for later layout rebuilding + */ + EXPORT = 256, + /** + * The parameter must be set after adding the children objects + */ + AFTER = 512, +} +alias GdlDockParamFlags DockParamFlags; + +/** + * Described the docking position. + */ +public enum GdlDockPlacement +{ + /** + * No position defined + */ + NONE = 0, + /** + * Dock object on the top + */ + TOP = 1, + /** + * Dock object on the bottom + */ + BOTTOM = 2, + /** + * Dock object on the right + */ + RIGHT = 3, + /** + * Dock object on the left + */ + LEFT = 4, + /** + * Dock object on top of the other + */ + CENTER = 5, + /** + * Dock object in its own window + */ + FLOATING = 6, +} +alias GdlDockPlacement DockPlacement; + +/** + * Used to customize the appearance of the tabs in #GdlDockNotebook. + */ +public enum GdlSwitcherStyle +{ + /** + * Tabs display only text labels. + */ + TEXT = 0, + /** + * Tabs display only icons. + */ + ICON = 1, + /** + * Tabs display text and icons. + */ + BOTH = 2, + /** + * Same as @GDL_SWITCHER_STYLE_BOTH. + */ + TOOLBAR = 3, + /** + * Tabs display like notebook tabs. + */ + TABS = 4, + /** + * Do not display tabs. + */ + NONE = 5, +} +alias GdlSwitcherStyle SwitcherStyle; + +struct GdlDock +{ + GdlDockObject object; + GdlDockPrivate* priv; +} + +struct GdlDockBar +{ + GtkBox parent; + GdlDock* deprecatedDock; + GdlDockBarPrivate* priv; +} + +struct GdlDockBarClass +{ + GtkBoxClass parentClass; +} + +struct GdlDockBarPrivate; + +struct GdlDockClass +{ + GdlDockObjectClass parentClass; + /** */ + extern(C) void function(GdlDock* dock) layoutChanged; +} + +struct GdlDockItem +{ + GdlDockObject object; + GdlDockItemPrivate* priv; +} + +struct GdlDockItemButtonImage +{ + GtkWidget parent; + GdlDockItemButtonImageType imageType; +} + +struct GdlDockItemButtonImageClass +{ + GtkWidgetClass parentClass; +} + +struct GdlDockItemClass +{ + GdlDockObjectClass parentClass; + GdlDockItemClassPrivate* priv; + /** */ + extern(C) void function(GdlDockItem* item, GtkOrientation orientation) setOrientation; + /** */ + extern(C) void function(GdlDockItem* item) dockDragBegin; + /** */ + extern(C) void function(GdlDockItem* item, GdkDevice* device, int x, int y) dockDragMotion; + /** */ + extern(C) void function(GdlDockItem* item, int cancelled) dockDragEnd; + /** */ + extern(C) void function(GdlDockItem* item, GtkDirectionType direction) moveFocusChild; +} + +struct GdlDockItemClassPrivate; + +struct GdlDockItemGrip +{ + GtkContainer parent; + GdlDockItemGripPrivate* priv; +} + +struct GdlDockItemGripClass +{ + GtkContainerClass parentClass; +} + +struct GdlDockItemGripPrivate; + +struct GdlDockItemPrivate; + +struct GdlDockLayout +{ + GObject gObject; + bool deprecatedDirty; + GdlDockMaster* deprecatedMaster; + GdlDockLayoutPrivate* priv; +} + +struct GdlDockLayoutClass +{ + GObjectClass gObjectClass; +} + +struct GdlDockLayoutPrivate; + +struct GdlDockMaster +{ + GObject object; + GdlDockMasterPrivate* priv; +} + +struct GdlDockMasterClass +{ + GObjectClass parentClass; + /** */ + extern(C) void function(GdlDockMaster* master) layoutChanged; +} + +struct GdlDockMasterPrivate; + +struct GdlDockNotebook +{ + GdlDockItem item; + GdlDockNotebookPrivate* priv; +} + +struct GdlDockNotebookClass +{ + GdlDockItemClass parentClass; + GdlDockNotebookClassPrivate* priv; +} + +struct GdlDockNotebookClassPrivate; + +struct GdlDockNotebookPrivate; + +struct GdlDockObject +{ + GtkContainer container; + GdlDockObjectFlags deprecatedFlags; + GObject* deprecatedMaster; + GdlDockObjectPrivate* priv; +} + +struct GdlDockObjectClass +{ + GtkContainerClass parentClass; + GdlDockObjectClassPrivate* priv; + /** */ + extern(C) void function(GdlDockObject* object, int recursive) detach; + /** */ + extern(C) void function(GdlDockObject* object) reduce; + /** + * + * Params: + * object = A #GdlDockObject + * x = X coordinate + * y = Y coordinate + * request = A #GdlDockRequest with information about the docking position + * Returns: %TRUE if @object has been docked. + */ + extern(C) int function(GdlDockObject* object, int x, int y, GdlDockRequest* request) dockRequest; + /** */ + extern(C) void function(GdlDockObject* object, GdlDockObject* requestor, GdlDockPlacement position, GValue* otherData) dock; + /** + * + * Params: + * object = A #GdlDockObject + * child = The child widget to reorder + * newPosition = New position for the child + * otherData = Optional data giving additional information + * depending on the dock object. + * Returns: %TRUE if @child has been moved + */ + extern(C) int function(GdlDockObject* object, GdlDockObject* child, GdlDockPlacement newPosition, GValue* otherData) reorder; + /** */ + extern(C) void function(GdlDockObject* object, GdlDockObject* child) present; + /** + * + * Params: + * object = the dock object we are asking for child placement + * child = the child of the @object we want the placement for + * placement = where to return the placement information + * Returns: %TRUE if @child is a child of @object. + */ + extern(C) int function(GdlDockObject* object, GdlDockObject* child, GdlDockPlacement* placement) childPlacement; +} + +struct GdlDockObjectClassPrivate; + +struct GdlDockObjectPrivate; + +struct GdlDockPaned +{ + GdlDockItem dockItem; + GdlDockPanedPrivate* priv; +} + +struct GdlDockPanedClass +{ + GdlDockItemClass parentClass; +} + +struct GdlDockPanedPrivate; + +struct GdlDockParam; + +struct GdlDockPlaceholder +{ + GdlDockObject object; + GdlDockPlaceholderPrivate* priv; +} + +struct GdlDockPlaceholderClass +{ + GdlDockObjectClass parentClass; +} + +struct GdlDockPlaceholderPrivate; + +struct GdlDockPrivate; + +/** + * Full docking information. + */ +struct GdlDockRequest +{ + /** + * A #GdlDockObject to dock + */ + GdlDockObject* applicant; + /** + * The #GdlDockObject target + */ + GdlDockObject* target; + /** + * how to dock @applicant in @target + */ + GdlDockPlacement position; + /** + * Precise position + */ + cairo_rectangle_int_t rect; + /** + * Additional information + */ + GValue extra; +} + +struct GdlDockTablabel +{ + GtkBin parent; + uint dragHandleSize; + GtkWidget* item; + GdkWindow* eventWindow; + bool active; + GdkEventButton dragStartEvent; + bool preDrag; +} + +struct GdlDockTablabelClass +{ + GtkBinClass parentClass; + /** */ + extern(C) void function(GdlDockTablabel* tablabel, GdkEventButton* event) buttonPressedHandle; +} + +struct GdlPreviewWindow +{ + GtkWindow parentInstance; +} + +struct GdlPreviewWindowClass +{ + GtkWindowClass parentClass; +} + +struct GdlSwitcher +{ + GtkNotebook parent; + GdlSwitcherPrivate* priv; +} + +struct GdlSwitcherClass +{ + GtkNotebookClass parentClass; + GdlSwitcherClassPrivate* priv; +} + +struct GdlSwitcherClassPrivate; + +struct GdlSwitcherPrivate; + +enum DOCK_MASTER_PROPERTY = "master"; +alias GDL_DOCK_MASTER_PROPERTY = DOCK_MASTER_PROPERTY; + +enum DOCK_NAME_PROPERTY = "name"; +alias GDL_DOCK_NAME_PROPERTY = DOCK_NAME_PROPERTY; + +/** + * Minimum shift count to be used for user defined flags, to be stored in + * #GdlDockObject.flags. + * + * Deprecated: Use a private flag instead + */ +enum DOCK_OBJECT_FLAGS_SHIFT = 8; +alias GDL_DOCK_OBJECT_FLAGS_SHIFT = DOCK_OBJECT_FLAGS_SHIFT; diff --git a/generated/gdl/gdlc/gdl.d b/generated/gdl/gdlc/gdl.d new file mode 100644 index 000000000..e7ddfed98 --- /dev/null +++ b/generated/gdl/gdlc/gdl.d @@ -0,0 +1,22 @@ +/* + * 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 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +module gdlc.gdl; + +public import gdl.c.functions; diff --git a/generated/gdl/gdlc/gdltypes.d b/generated/gdl/gdlc/gdltypes.d new file mode 100644 index 000000000..27f0a8436 --- /dev/null +++ b/generated/gdl/gdlc/gdltypes.d @@ -0,0 +1,22 @@ +/* + * 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 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +module gdlc.gdltypes; + +public import gdl.c.types; diff --git a/makeddox.sh b/makeddox.sh index cdd2295a1..5c9979992 100755 --- a/makeddox.sh +++ b/makeddox.sh @@ -9,6 +9,7 @@ grep -h -e "^module" generated/sourceview/* -r | sort -u | sed 's/;//' | sed 's/ grep -h -e "^module" generated/vte/* -r | sort -u | sed 's/;//' | sed 's/\r//' | sed 's/module \(.*\)$/\t$(MODULE \1)/' >> modules.ddoc grep -h -e "^module" generated/gstreamer/* -r | sort -u | sed 's/;//' | sed 's/\r//' | sed 's/module \(.*\)$/\t$(MODULE \1)/' >> modules.ddoc grep -h -e "^module" generated/peas/* -r | sort -u | sed 's/;//' | sed 's/\r//' | sed 's/module \(.*\)$/\t$(MODULE \1)/' >> modules.ddoc +grep -h -e "^module" generated/gdl/* -r | sort -u | sed 's/;//' | sed 's/\r//' | sed 's/module \(.*\)$/\t$(MODULE \1)/' >> modules.ddoc dmd -o- -D -X -Xfddox/docs.json -Ddddox/temp \ generated/gtkd/gtk/*.d generated/gtkd/gtk/c/*.d generated/gtkd/gtkc/*.d generated/gtkd/gtkd/*.d generated/gtkd/glib/*.d generated/gtkd/glib/c/*.d generated/gtkd/gio/*.d \ @@ -19,7 +20,9 @@ dmd -o- -D -X -Xfddox/docs.json -Ddddox/temp \ generated/vte/vtec/*.d generated/vte/vte/*.d generated/vte/vte/c/*.d \ generated/gstreamer/gstreamer/*.d generated/gstreamer/gstreamer/c/*.d generated/gstreamer/gstinterfaces/*.d generated/gstreamer/gstinterfaces/c/*.d generated/gstreamer/gstreamerc/*.d \ generated/gstreamer/gst/mpegts/*.d generated/gstreamer/gst/mpegts/c/*.d generated/gstreamer/gst/base/*.d generated/gstreamer/gst/base/c/*.d generated/gstreamer/gst/app/*.d generated/gstreamer/gst/app/c/*.d \ - generated/peas/peas/*.d generated/peas/peas/c/*.d generated/peas/peasc/*.d -op + generated/peas/peas/*.d generated/peas/peas/c/*.d generated/peas/peasc/*.d \ + generated/gdl/gdl/*.d generated/gdl/gdl/c/*.d generated/gdl/gdlc/*.d \ + -op # Delete all html files generated by D ddocs rm -rf ddox/temp/* diff --git a/makedocs.sh b/makedocs.sh index 2219e3755..9c2e650bd 100755 --- a/makedocs.sh +++ b/makedocs.sh @@ -4,6 +4,7 @@ grep -h -e "^module" generated/sourceview/* -r | sort -u | sed 's/;//' | sed 's/ grep -h -e "^module" generated/gstreamer/* -r | sort -u | sed 's/;//' | sed 's/\r//' | sed 's/module \(.*\)$/\t$(MODULE \1)/' >> modules.ddoc grep -h -e "^module" generated/vte/* -r | sort -u | sed 's/;//' | sed 's/\r//' | sed 's/module \(.*\)$/\t$(MODULE \1)/' >> modules.ddoc grep -h -e "^module" generated/peas/* -r | sort -u | sed 's/;//' | sed 's/\r//' | sed 's/module \(.*\)$/\t$(MODULE \1)/' >> modules.ddoc +grep -h -e "^module" generated/gdl/* -r | sort -u | sed 's/;//' | sed 's/\r//' | sed 's/module \(.*\)$/\t$(MODULE \1)/' >> modules.ddoc cd generated @@ -16,7 +17,9 @@ dmd -o- -D -Dd../docs ../modules.ddoc ../docs/candydoc/candy.ddoc \ vte/vtec/*.d vte/vte/*.d vte/vte/c/*.d \ gstreamer/gstreamer/*.d gstreamer/gstreamer/c/*.d gstreamer/gstinterfaces/*.d gstreamer/gstinterfaces/c/*.d gstreamer/gstreamerc/*.d \ gstreamer/gst/mpegts/*.d gstreamer/gst/mpegts/c/*.d gstreamer/gst/base/*.d gstreamer/gst/base/c/*.d gstreamer/gst/app/*.d gstreamer/gst/app/c/*.d \ - peas/peas/*.d peas/peas/c/*.d peas/peasc/*.d -op + peas/peas/*.d peas/peas/c/*.d peas/peasc/*.d \ + gdl/gdl/*.d gdl/gdl/c/*.d gdl/gdlc/*.d \ + -op cd ../docs diff --git a/src/APILookup.txt b/src/APILookup.txt index cfaf3d1a6..78996bed1 100644 --- a/src/APILookup.txt +++ b/src/APILookup.txt @@ -95,3 +95,7 @@ version: end srcDir: peas copy: peasc lookup: APILookupPeas.txt + +srcDir: gdl +copy: gdlc +lookup: APILookupGdl.txt diff --git a/src/APILookupGdl.txt b/src/APILookupGdl.txt new file mode 100644 index 000000000..22b7e8e27 --- /dev/null +++ b/src/APILookupGdl.txt @@ -0,0 +1,44 @@ +# 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 +# + +############################################# +### Definitions for wrapping Gtk+ ########### +############################################# + +# must start with wrap +wrap: gdl +file: Gdl-3.gir + +struct: DockBar +override: get_orientation +override: set_orientation +alias: get_style getDockBarStyle + +struct: DockTablabel +# activate is deprecated, remove override which would break +noCode: activate +# symmetry with deactivate code, to avoid wrong usage +noCode: deactivate + +struct: DockItem +alias: bind bindTo + +struct: DockNotebook +alias: bind bindTo + +struct: DockPaned +alias: bind bindTo diff --git a/src/gdlc/gdl.d b/src/gdlc/gdl.d new file mode 100644 index 000000000..e7ddfed98 --- /dev/null +++ b/src/gdlc/gdl.d @@ -0,0 +1,22 @@ +/* + * 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 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +module gdlc.gdl; + +public import gdl.c.functions; diff --git a/src/gdlc/gdltypes.d b/src/gdlc/gdltypes.d new file mode 100644 index 000000000..27f0a8436 --- /dev/null +++ b/src/gdlc/gdltypes.d @@ -0,0 +1,22 @@ +/* + * 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 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +module gdlc.gdltypes; + +public import gdl.c.types; diff --git a/src/gtkd/paths.d b/src/gtkd/paths.d index 38d9a3264..27b40b36b 100644 --- a/src/gtkd/paths.d +++ b/src/gtkd/paths.d @@ -54,6 +54,7 @@ enum LIBRARY VTE, PEAS, RSVG, + GDL, } version (Windows) @@ -81,6 +82,7 @@ version (Windows) LIBRARY.VTE: "libvte-2.91.dll", LIBRARY.PEAS: "libpeas-1.0.dll", LIBRARY.RSVG: "librsvg-2-2.dll", + LIBRARY.GDL: "libgdl-3.dll", ]; } else version(darwin) @@ -108,6 +110,7 @@ else version(darwin) LIBRARY.VTE: "libvte-2.91.dylib", LIBRARY.PEAS: "libpeas-1.0.dylib", LIBRARY.RSVG: "librsvg-2.dylib", + LIBRARY.GDL: "libgdl-3.dylib", ]; } else @@ -135,5 +138,6 @@ else LIBRARY.VTE: "libvte-2.91.so.0", LIBRARY.PEAS: "libpeas-1.0.so.0", LIBRARY.RSVG: "librsvg-2.so.2", + LIBRARY.GDL: "libgdl-3.so.5", ]; }